Click here to Skip to main content
15,886,110 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to get object from array with selectedindex of listview Pin
Aljaz11116-Nov-09 7:28
Aljaz11116-Nov-09 7:28 
GeneralRe: How to get object from array with selectedindex of listview Pin
Saksida Bojan16-Nov-09 7:37
Saksida Bojan16-Nov-09 7:37 
GeneralRe: How to get object from array with selectedindex of listview Pin
Luc Pattyn16-Nov-09 7:40
sitebuilderLuc Pattyn16-Nov-09 7:40 
GeneralRe: How to get object from array with selectedindex of listview Pin
Aljaz11116-Nov-09 11:11
Aljaz11116-Nov-09 11:11 
GeneralRe: How to get object from array with selectedindex of listview Pin
Luc Pattyn16-Nov-09 11:28
sitebuilderLuc Pattyn16-Nov-09 11:28 
GeneralRe: How to get object from array with selectedindex of listview Pin
Shameel16-Nov-09 23:09
professionalShameel16-Nov-09 23:09 
QuestionImages are shrunken => i want to get them shrink-proof Pin
tronix0116-Nov-09 4:22
tronix0116-Nov-09 4:22 
QuestionWord Interop: Unable to save text in a document Pin
mailtogj16-Nov-09 4:21
mailtogj16-Nov-09 4:21 
Hi
Got stuck here. Word document gets saved in the correct directory with the correct name but the typed text doesn't persist. Please help. (*I have tested that the text is actually typed in the active document).

private void SaveDoc()
{
Word.Application wdApp;
Word.Document wdDoc;
wdApp = new Word.Application();
wdDoc = wdApp.Documents.Add(ref missing, ref missing, ref missing, ref missing);

//type some text
wdApp.Selection.TypeText("Some Heading"));

//set rtf doc paragraph 1 style to normal
object wdParaStyleName = "Heading 1"
wdDoc.Paragraphs[1].set_Style(ref wdParaStyleName);

//save rtf doc
wdApp.ChangeFileOpenDirectory("C:\\test\\");
object wdFileName = "TestDoc.rtf"
object saveFmt = Word.WdSaveFormat.wdFormatRTF;
wdApp.ActiveDocument.SaveAs(ref wdFileName, ref saveFmt, ref falseO, ref missing, ref falseO, ref missing, ref trueO, ref falseO, ref falseO, ref trueO, ref falseO, ref missing, ref falseO, ref falseO, ref missing, ref falseO);

//Quit Word
object saveChanges = Word.WdSaveOptions.wdDoNotSaveChanges;
wdApp.Quit(ref saveChanges, ref missing, ref missing);
}

Using doc.save() prompts the save dialog which defeats the purpose of automation.

Thanks
GJ
AnswerRe: Word Interop: Unable to save text in a document Pin
EliottA16-Nov-09 4:33
EliottA16-Nov-09 4:33 
GeneralRe: Word Interop: Unable to save text in a document Pin
mailtogj17-Nov-09 4:48
mailtogj17-Nov-09 4:48 
QuestionOutlook VSTO Appointment Item Delete Event Pin
Programm3r16-Nov-09 3:52
Programm3r16-Nov-09 3:52 
QuestionHelp with BackgroundWoker Pin
Etienne_12316-Nov-09 3:48
Etienne_12316-Nov-09 3:48 
AnswerRe: Help with BackgroundWoker Pin
Not Active16-Nov-09 4:05
mentorNot Active16-Nov-09 4:05 
AnswerRe: Help with BackgroundWoker Pin
The Man from U.N.C.L.E.16-Nov-09 4:14
The Man from U.N.C.L.E.16-Nov-09 4:14 
GeneralRe: Help with BackgroundWoker Pin
Not Active16-Nov-09 6:23
mentorNot Active16-Nov-09 6:23 
AnswerRe: Help with BackgroundWoker Pin
Luc Pattyn16-Nov-09 7:20
sitebuilderLuc Pattyn16-Nov-09 7:20 
QuestionNullable Rectangle Pin
gwithey16-Nov-09 3:00
gwithey16-Nov-09 3:00 
AnswerRe: Nullable Rectangle Pin
The Man from U.N.C.L.E.16-Nov-09 4:11
The Man from U.N.C.L.E.16-Nov-09 4:11 
QuestionDrawing time instead of numbers in opengl Pin
Paul Harsent16-Nov-09 2:56
Paul Harsent16-Nov-09 2:56 
QuestionHow to selected drowndown list options in web browser Pin
fatix16-Nov-09 2:51
fatix16-Nov-09 2:51 
AnswerRe: How to selected drowndown list options in web browser Pin
Shameel16-Nov-09 3:29
professionalShameel16-Nov-09 3:29 
GeneralRe: How to selected drowndown list options in web browser Pin
fatix16-Nov-09 3:33
fatix16-Nov-09 3:33 
GeneralRe: How to selected drowndown list options in web browser Pin
Shameel16-Nov-09 7:19
professionalShameel16-Nov-09 7:19 
QuestionRe: How to selected drowndown list options in web browser Pin
fatix16-Nov-09 7:38
fatix16-Nov-09 7:38 
AnswerRe: How to selected drowndown list options in web browser Pin
fatix16-Nov-09 12:40
fatix16-Nov-09 12:40 

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.