Click here to Skip to main content
15,890,282 members
Home / Discussions / C#
   

C#

 
GeneralRe: Components: create runtime/designtime bindable property, possible? Pin
Wendell.S23-Nov-09 8:56
Wendell.S23-Nov-09 8:56 
GeneralRe: Components: create runtime/designtime bindable property, possible? Pin
dojohansen23-Nov-09 9:14
dojohansen23-Nov-09 9:14 
GeneralRe: Components: create runtime/designtime bindable property, possible? Pin
Wendell.S23-Nov-09 17:11
Wendell.S23-Nov-09 17:11 
GeneralRe: Components: create runtime/designtime bindable property, possible? Pin
Gerry Schmitz23-Nov-09 22:30
mveGerry Schmitz23-Nov-09 22:30 
GeneralRe: Components: create runtime/designtime bindable property, possible? Pin
Wendell.S23-Nov-09 23:52
Wendell.S23-Nov-09 23:52 
GeneralRe: Components: create runtime/designtime bindable property, possible? Pin
dojohansen24-Nov-09 0:14
dojohansen24-Nov-09 0:14 
GeneralRe: Components: create runtime/designtime bindable property, possible? Pin
Gerry Schmitz24-Nov-09 4:07
mveGerry Schmitz24-Nov-09 4:07 
QuestionUngroup shape in word file in c# Pin
Pankaj Saha23-Nov-09 2:24
Pankaj Saha23-Nov-09 2:24 
Hi, I have a word file which contains numbers of shapes. Each shape contain some textboxes. I am copying that file to another location and assigning some values to those textboxes of those shapes. Now I have to assign the values to those textboxes then I have to ungroup those shape first then only I can assign values those text boxes. Now the problem is that when I ungroup those shapes, they change their locations in the document. I do not understand what is the problem. Here is the code

//copy the sourc file to another location
System.IO.File.Copy(Convert.ToString(source), Convert.ToString(destination));

Microsoft.Office.Interop.Word.Document obDoc = new Microsoft.Office.Interop.Word.Document();

object unknown = Type.Missing;
object format = Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatDocumentDefault;
obDoc = varWord.Documents.Add(ref source, ref unknown, ref unknown, ref visible);

obDoc.Activate();

//hiding a shape--working fine
obj = "shape1";
varWord.ActiveDocument.Shapes.get_Item(ref obj).Select(ref unknown);
varWord.ActiveDocument.Shapes.get_Item(ref obj).Visible = MsoTriState.msoFalse;


//ungroup the shape
obj = "Shape2";
varWord.ActiveDocument.Shapes.get_Item(ref obj).Select(ref unknown);
varWord.ActiveDocument.Shapes.get_Item(ref obj).Ungroup();


obj = "txtbox1";
varWord.ActiveDocument.Shapes.get_Item(ref obj).Select(ref unknown);
varWord.Selection.TypeText(txtbox1value);

//show the word file
varWord.Visible = true;
varWord = null;



Frown | :(

Pankaj

AnswerRe: Ungroup shape in word file in c# Pin
Pankaj Saha23-Nov-09 3:42
Pankaj Saha23-Nov-09 3:42 
GeneralRe: Ungroup shape in word file in c# Pin
Abhishek Sur23-Nov-09 3:48
professionalAbhishek Sur23-Nov-09 3:48 
GeneralRe: Ungroup shape in word file in c# Pin
Pankaj Saha23-Nov-09 17:46
Pankaj Saha23-Nov-09 17:46 
QuestionGetting CurrentException without catch. Pin
Paulo Zemek23-Nov-09 1:48
mvaPaulo Zemek23-Nov-09 1:48 
AnswerRe: Getting CurrentException without catch. Pin
Richard MacCutchan23-Nov-09 2:06
mveRichard MacCutchan23-Nov-09 2:06 
AnswerRe: Getting CurrentException without catch. Pin
Luc Pattyn23-Nov-09 2:19
sitebuilderLuc Pattyn23-Nov-09 2:19 
AnswerRe: Getting CurrentException without catch. Pin
Shameel23-Nov-09 4:30
professionalShameel23-Nov-09 4:30 
GeneralRe: Getting CurrentException without catch. [modified] Pin
Paulo Zemek23-Nov-09 6:22
mvaPaulo Zemek23-Nov-09 6:22 
GeneralRe: Getting CurrentException without catch. Pin
The Man from U.N.C.L.E.23-Nov-09 6:52
The Man from U.N.C.L.E.23-Nov-09 6:52 
GeneralRe: Getting CurrentException without catch. Pin
Paulo Zemek23-Nov-09 7:03
mvaPaulo Zemek23-Nov-09 7:03 
GeneralRe: Getting CurrentException without catch. Pin
Shameel23-Nov-09 7:23
professionalShameel23-Nov-09 7:23 
AnswerRe: Getting CurrentException without catch. [modified] Pin
dojohansen23-Nov-09 8:25
dojohansen23-Nov-09 8:25 
AnswerRe: Getting CurrentException without catch: use Marshal.GetExceptionCode() Pin
Daniel Grunwald23-Nov-09 13:07
Daniel Grunwald23-Nov-09 13:07 
GeneralRe: Getting CurrentException without catch: use Marshal.GetExceptionCode() Pin
Paulo Zemek23-Nov-09 13:12
mvaPaulo Zemek23-Nov-09 13:12 
QuestionParameterless catch? Pin
Etienne_12323-Nov-09 0:20
Etienne_12323-Nov-09 0:20 
AnswerRe: Parameterless catch? PinPopular
dojohansen23-Nov-09 0:23
dojohansen23-Nov-09 0:23 
AnswerRe: Parameterless catch? Pin
Richard MacCutchan23-Nov-09 0:24
mveRichard MacCutchan23-Nov-09 0:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.