首页 新闻 会员 周边

DSOFramer 关于 SetDocVariable在word中设置一个变量

0
悬赏园豆:50 [已关闭问题] 关闭于 2011-08-23 20:33

Function SetDocVariable(ByVal strVarName As String, ByVal strValue As String, ByVal lOpt As Long) As Long

 关于 SetDocVariable在word中设置一个变量,通过设置一个变量,然后通过变量来 赋值,不知哪位大虾 研究过,给点提示 。

问题补充:

foreach (Word.Section section in oWord.ActiveDocument.Sections)
  {
  section.Headers[Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].Range.Text = section.Headers[Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].Range.Text.Replace("{pnomber}", "123");
  }

通过这个解决了,希望给其他人有用!

弄了好久才搞好。

dpsm的主页 dpsm | 初学一级 | 园豆:160
提问于:2011-08-21 18:29
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册