Click here to Skip to main content
15,891,905 members
Home / Discussions / C#
   

C#

 
QuestionCreating A Button Pin
aaffbbww16-Nov-09 9:04
aaffbbww16-Nov-09 9:04 
AnswerRe: Creating A Button Pin
Ian Shlasko16-Nov-09 9:06
Ian Shlasko16-Nov-09 9:06 
GeneralRe: Creating A Button Pin
aaffbbww16-Nov-09 9:11
aaffbbww16-Nov-09 9:11 
GeneralRe: Creating A Button Pin
Luc Pattyn16-Nov-09 9:21
sitebuilderLuc Pattyn16-Nov-09 9:21 
GeneralRe: Creating A Button Pin
aaffbbww16-Nov-09 9:24
aaffbbww16-Nov-09 9:24 
GeneralRe: Creating A Button Pin
Dave Kreskowiak16-Nov-09 9:58
mveDave Kreskowiak16-Nov-09 9:58 
Questionprint Pin
farokhian16-Nov-09 9:01
farokhian16-Nov-09 9:01 
AnswerRe: print Pin
Saksida Bojan16-Nov-09 9:46
Saksida Bojan16-Nov-09 9:46 
GeneralRe: print Pin
farokhian16-Nov-09 9:54
farokhian16-Nov-09 9:54 
GeneralRe: print Pin
Saksida Bojan16-Nov-09 10:05
Saksida Bojan16-Nov-09 10:05 
QuestionHow to get object from array with selectedindex of listview Pin
Aljaz11116-Nov-09 7:06
Aljaz11116-Nov-09 7:06 
AnswerRe: How to get object from array with selectedindex of listview Pin
Saksida Bojan16-Nov-09 7:16
Saksida Bojan16-Nov-09 7:16 
AnswerRe: How to get object from array with selectedindex of listview Pin
Shameel16-Nov-09 7:24
professionalShameel16-Nov-09 7:24 
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 

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.