通过VB将文本插入MS Word [英] Insert text to MS Word through VB

查看:83
本文介绍了通过VB将文本插入MS Word的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我有一个VB.Net应用程序,其中有一个列表视图中的项目.我的项目打开一个现有文档,并可以创建一个新的word文档.我想做的是当我双击列表视图中的一个项目时,我想将该项目插入到当前光标所在的Word文档中.任何帮助将不胜感激,或将我指出正确的方向:-)

Hi all

I have a VB.Net application with items in a listview. My project open an existing document and can create a new word document. What I am trying to do is when I double click on an item in the listview I want to insert that item to the word document where the current cursor is at. Any help would be appreciated or point me to the right direction :-)

推荐答案

别担心,我找到了解决方案,我只是使用了:
objWordApp.Selection.TypeText(strAlias)
Don''t worry I found the solution, I just used:
objWordApp.Selection.TypeText(strAlias)


您可能可以使用range 插入现有的Word文档中.
请参阅 [
You can probably use a range to insert into an existing Word document.
See this[^] for more help.


这篇关于通过VB将文本插入MS Word的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆