删除MS Word文档的文本框
我有几个在文本框中包含文本的 MS Word 文档。我想删除这些文本框但保留数据。我该怎么做?
I have few MS word documents which contains text in text boxes. I want to remove those text boxes but keep the data as it. How can i do it ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您可以使用诸如 ActiveDocument.Shapes(1).TextFrame.TextRange.Text 之类的方法从文本框中获取文本,然后您可以通过执行诸如 ActiveDocument 之类的操作来删除它。 Shapes(1).Delete,之后您必须将从文本框中检索到的文本放入文档的相关部分。
I think you can get hold of the text from inside the textboxes using something like
ActiveDocument.Shapes(1).TextFrame.TextRange.Text
and then you could delete it by doing something likeActiveDocument.Shapes(1).Delete
, and after that you'd have to put the text you retrieved from the text box in the relevant part of the document.