0
我正在使用Word Automation從我的應用程序創建文檔,並且需要將三個簽名添加到文檔的頁腳。然而,這很容易讓他們出現,因爲我想不起作用。將三個對齊圖像添加到word文檔頁腳
下面是我使用的代碼:
//add initials to footer
if (oWordDoc.Sections.Count > 0) {
Range r = oWordDoc.Sections[1].Footers[WdHeaderFooterIndex.wdHeaderFooterPrimary].Range;
Object colapseDir = WdCollapseDirection.wdCollapseStart;
r.Collapse(ref colapseDir);
oWord.ActiveWindow.View.Type = WdViewType.wdPrintView;
oWord.ActiveWindow.ActivePane.View.SeekView = WdSeekView.wdSeekCurrentPageFooter;
oWord.Selection.TypeParagraph();
oWord.Selection.Paragraphs.Alignment = WdParagraphAlignment.wdAlignParagraphLeft;
oWord.ActiveWindow.Selection.Font.Name = "Arial";
oWord.ActiveWindow.Selection.Font.Size = 8;
if (!String.IsNullOrEmpty(plaintiffInitialFile)) {
r.InlineShapes.AddPicture(plaintiffInitialFile, ref oMissing, ref oTrue, ref oMissing);
}
oWord.ActiveWindow.Selection.TypeText("Plaintiff's Initals");
oWord.ActiveWindow.Selection.TypeText("\t");
if (!String.IsNullOrEmpty(plaintiffAttInitialFile)) {
r.InlineShapes.AddPicture(plaintiffAttInitialFile, ref oMissing, ref oTrue, ref oMissing);
}
oWord.ActiveWindow.Selection.TypeText("Plaintiff's Attorney's Initals");
oWord.ActiveWindow.Selection.TypeText("\t");
if (!String.IsNullOrEmpty(ekfgInitialFile)) {
r.InlineShapes.AddPicture(ekfgInitialFile, ref oMissing, ref oTrue, ref oMissing);
}
oWord.ActiveWindow.Selection.TypeText("EKFG's Initals");
}
這裏是它是生產什麼(我已經添加了註解)
這裏就是我想要的
什麼我需要做什麼?