开发者

How can I insert a footer in word?

开发者 https://www.devze.com 2022-12-14 06:15 出处:网络
I\'m using this to open an RTF in Word and save it as a PDF: Object oMissing = System.Reflection.Missing.Value;//null for VB

I'm using this to open an RTF in Word and save it as a PDF:

                Object oMissing = System.Reflection.Missing.Value;    //null for VB
                Object oTrue = true;
                Object oFalse = false;

                Microsoft.Office.Interop.Word.Application oWord = new Microsoft.Office.Interop.Word.Application();
                Microsoft.Office.Interop.Word.Document oWordDoc = new Microsoft.Office.Interop.Word.Document();

                oWord.Visible = false;
                Object rtfFile = filename;
                Object saveLoc = sfd.FileName;
                Object wdFormatPDF = 17;    //WdSaveFormat Enumeration
                oWordDoc = oWord.Documents.Add(ref rtfFile, ref oMissing, ref oMissing, ref oMissing);
                oWordDoc.SaveAs(ref saveLoc, ref wdFormatPDF, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
                     ref oMissing, ref oMissing, ref oMiss开发者_StackOverflow中文版ing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing);

                oWordDoc.Close(ref oFalse, ref oMissing, ref oMissing);
                oWord.Quit(ref oFalse, ref oMissing, ref oMissing);

But I need to insert a footer on every page too. How can I do this?


Check this discussion in MSDN and see if it helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消