开发者

Write a Word 2007 document in OpenXML

开发者 https://www.devze.com 2022-12-27 04:42 出处:网络
My problem is in two parts: How can I, i开发者_运维问答n Word 2007, put an id on a section so I can easy access this section from my code? For example, if I have Name : Here I want to set the name f

My problem is in two parts:

  1. How can I, i开发者_运维问答n Word 2007, put an id on a section so I can easy access this section from my code? For example, if I have Name : Here I want to set the name from my C# code.

  2. How can I, from my C# code, fill this section id ?


The best way is to use Content Controls in Word (and the Content Control Toolkit). There are tons of examples out there, like:

  • http://coolthingoftheday.blogspot.com/2006/11/open-xmlword-2007-content-control.html
  • http://www.vsj.co.uk/articles/display.asp?id=657
  • http://www.craigmurphy.com/blog/?p=913
0

精彩评论

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

关注公众号