MS word 的 VBA
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/207375/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
VBA for MS word
提问by Vaibhav Garg
There are a lot of free sources to learn about the object model of MS Excel, but I failed to find any comprehensive source for a similar source for MS Word.
有很多免费资源可以了解 MS Excel 的对象模型,但我没有找到任何类似 MS Word 资源的综合资源。
Can You suggest a free and comprehensive source for the same?
你能推荐一个免费和全面的资源吗?
回答by Carl G
I recently learned the Word Object Model and I found the following pages most helpful. I think that as long as you understand the Word Application (from a user perspective), all you need to do is flesh out your understanding of Word.Range and eventually Word Story Types. And as the other posters have suggested, the Object Browser in Word's Visual Basic Editor is very convenient for browsing the available properties and methods for any particular object.
我最近学习了 Word 对象模型,我发现以下几页最有帮助。我认为只要您了解 Word 应用程序(从用户的角度),您所需要做的就是充实您对 Word.Range 和最终 Word Story Types 的理解。正如其他海报所建议的那样,Word 的 Visual Basic 编辑器中的对象浏览器对于浏览任何特定对象的可用属性和方法非常方便。
Entry point for all Word VBA. Browse by method, object, collection, etc.:
所有 Word VBA 的入口点。按方法、对象、集合等浏览:
Helpful pages specifically about using Word's Ranges:
专门关于使用 Word 范围的有用页面:
An introduction to Word's Story Types:
Word 的故事类型简介:
回答by yalestar
In the VBA editor, if you hit F2, there's an object browser that is a pretty handy reference. You can also filter it for Word-specific objects.
在 VBA 编辑器中,如果您按 F2,则会有一个对象浏览器,这是一个非常方便的参考。您还可以过滤特定于 Word 的对象。
回答by Tomalak
A look into the VBA Help (along with the debugger) helped me to learn anything I needed. The help file is really comprehensive.
查看 VBA 帮助(以及调试器)帮助我学习了任何我需要的东西。帮助文件非常全面。