请问 delphi 替换第二页word 页面的页眉怎么替换?第一页和第二页不同的。
下面的代码如果第一页和第二页的页眉相同,就没问题,但是如果第一页和第二页不同,第二页的内容就替换不了
worddocument1.ActiveWindow.ActivePane.View.SeekView := wdSeekCurrentPageHeader;
worddocument1.activewindow.activepane.selection.Find.Execute(findtext,matchcase, matchwholeword,
matchwildcards, matchsoundslike, matchallwordforms, goforward,
wrap, format, replacewith, replace,MatchKashida, MatchDiacritics, MatchAlefHamza, MatchControl);
worddocument1.ActiveWindow.ActivePane.View.SeekView := wdSeekMainDocument;谢谢!
下面的代码如果第一页和第二页的页眉相同,就没问题,但是如果第一页和第二页不同,第二页的内容就替换不了
worddocument1.ActiveWindow.ActivePane.View.SeekView := wdSeekCurrentPageHeader;
worddocument1.activewindow.activepane.selection.Find.Execute(findtext,matchcase, matchwholeword,
matchwildcards, matchsoundslike, matchallwordforms, goforward,
wrap, format, replacewith, replace,MatchKashida, MatchDiacritics, MatchAlefHamza, MatchControl);
worddocument1.ActiveWindow.ActivePane.View.SeekView := wdSeekMainDocument;谢谢!
另外你可以通过录制宏来查看一下VBA代码