需要有关OLE Word自动化的信息 [英] Need information about OLE Word automation
问题描述
大家好!
我想首先感谢所有花时间查看此主题并尝试提供帮助的人。
我有一张表需要填充数据。我在这里问了一个问题:
如何在MS WORD中将文本插入表格? [ ^ ]
但是,我需要将带有单元格宽度的变量传递给AutoWrap函数而不是字符宽度。
我的问题是:
如何获取这些枚举常量的整数值:
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.wdunits(v = office.14)的.aspx [ <小时ef =http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.wdunits(v=office.14).aspx\"target =_ blanktitle =New Window> ^ ]
我只需将其作为变量传递给AutoWrap。
我在MS Visual Studio Express 2008中工作,在Windows XP上,在C ++中,使用纯WIN32 API。
谢谢大家。
Hello everyone!
I would like to start by saying thanks to everyone who takes some time to view this thread and try to help.
I have a table that needs to be populated with data.I have asked a question about it here:
How to insert text into tables in MS WORD ?[^]
However,I need to pass variant with cell width to AutoWrap function instead of character width.
My question is:
How to get integer values of these enumeration constants:
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.wdunits(v=office.14).aspx[^]
I just need to pass it as a variant to AutoWrap.
I work in MS Visual Studio Express 2008, on Windows XP, in C++, using pure WIN32 API.
Thank you all.
推荐答案
下面这些是什么? - 如果是这样,只需继续阅读该页面 - 它们就在其中一条评论中。
但是如果你想查找任意常数并且厌倦了使用谷歌,只需使用MS提供的内置工具。
即当你打开脚本编辑器,转到视图 - >对象浏览器(F2) - 你可以看到对象的成员变量和枚举值。
wdCell = 12
wdCharacter = 1
wdCharacterFormatting = 13 >
wdColumn = 9
wdItem = 16
wdLine = 5
wdParagraph = 4
wdParagraphFormatting = 14
wdRow = 10
wdScreen = 7
wdSection = 8
wdSentence = 3
wdStory = 6
wdTable = 15
wdWindow = 11
wdWord = 2
What, like these ones below? - If so, just keep reading that page - they're in one of the comments.
But if you want to look up arbitrary constants and are sick of using google, just use the built-in tool that MS provides.
I.e When you're got the script editor open, Goto View->Object Browser (F2) - you can see the member variables of objects and the values of enumerations.
wdCell = 12
wdCharacter = 1
wdCharacterFormatting = 13
wdColumn = 9
wdItem = 16
wdLine = 5
wdParagraph = 4
wdParagraphFormatting = 14
wdRow = 10
wdScreen = 7
wdSection = 8
wdSentence = 3
wdStory = 6
wdTable = 15
wdWindow = 11
wdWord = 2
这篇关于需要有关OLE Word自动化的信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!