将桌子放置在特定位置
我编写了一个宏,允许用户从组合框中选择办公室分支机构,现在我想将相关地址插入到Word文档的特定位置。我使用表来保存地址,但是当创建表时,它会在光标恰好位于页面上的任何位置创建。
我似乎找不到一种方法来告诉表格将 (x,y) 精确定位在我需要它出现的位置。由于文档中除了文本之外没有其他任何内容,因此没有任何可参考的内容。
如果可能的话,我也尽量避免使用 Active X 控件。
I have written a macro to allow a user to select an office branch from a combo box, and now I want to insert the relevant address into the word document at a specific location. I have it using a table to hold the address, however when the table is created, it is created at wherever position the cursor just happens to be sitting at on the page.
I can't seem to find a way to tell the table to position exactly (x,y) where I need it to appear. Since there is nothing else in the document but text, there is nothing to reference to.
I am also trying to stay away from using Active X controls if at all possible.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
此代码将在第二段和第三段之间添加一个三列一行的表格。
This code will add a three column, one row table between the second and third paragraphs.
您可以使用它来水平和垂直定位表格
希望有帮助。
You may use this to position table both horizontally and vertically
Hope that helped.
我无法使用 Dick Kusleika 的答案 中的 with-statement 来理解代码,所以我想分享我的版本with-语句,对于像我这样的人来说更容易理解:
I had trouble grasping the code with the with-statement from Dick Kusleika's answer, so I'd like to share my version without the with-statement, for people like me much easier to understand: