如何使用VB.Net 2010多次将单词表复制到特定位置? [英] How to copy a word table multiple times to a specific place using VB.Net 2010?

查看:114
本文介绍了如何使用VB.Net 2010多次将单词表复制到特定位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用VB.Net 2010多次将单词表复制到特定位置?



我正在使用Interop处理VB.Net 2010程序课程。



我们在尝试复制一张桌子超过1次时遇到问题。



要么将它与Word Doc中的原始表合并,要么将其放入下一个表格。



是否有明确的解释如何一张桌子可以复制2-3次吗?



复制第一张桌子,但第二张桌子插入原桌子后的桌子里。





Imports Word = Microsoft.Office.Interop.Word

...

我们是目前使用的功能如下:

MyCopyFromRange.Select()

MyCopyFromRange.Copy()



Rng = MyCopyFromRange

Rng.SetRange(MyCopyFromRange.End,MyCopyFromRange.End)



For MyCnt = 1 to pN oO $

WordApp.Selection.InsertAfter(MySepStr)'然后它不会附加到DevTable



WordApp.Selection.MoveDown()'移动如果没有附加到原始表格需要下来



WordApp.Selection.Paste()'手动粘贴工作没有向下移动这没有。它把它放在下表中

..

下一步

How to copy a word table multiple times to a specific place using VB.Net 2010?

I am working on a VB.Net 2010 program using the Interop class.

We are having problems trying to duplicate a table more than 1 time to be put in the place we want.

It is either merging it with the original table in the Word Doc or putting it into the next table.

Is there a clear explanation on how a table can be duplicated 2-3 times?

It copies the first table fine but the 2nd is inserted into the table following the original table.


Imports Word = Microsoft.Office.Interop.Word
...
We are currently using functions as:
MyCopyFromRange.Select()
MyCopyFromRange.Copy()

Rng = MyCopyFromRange
Rng.SetRange(MyCopyFromRange.End, MyCopyFromRange.End)

For MyCnt = 1 To pNoOf
WordApp.Selection.InsertAfter(MySepStr) ' not then it appends to the DevTable

WordApp.Selection.MoveDown() ' Move down needed if not appends to origina table

WordApp.Selection.Paste() ' Manual paste works without the move down this does not. It puts it in the next table
..
Next

推荐答案

这篇关于如何使用VB.Net 2010多次将单词表复制到特定位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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