Is there any place own the WEB that has tutorials on Word 2000 automation from VB. I've done simple tasks, but would really like a tutorial to expand my knowledge (very limited knowledge).
Anybody know?
Printable View
Is there any place own the WEB that has tutorials on Word 2000 automation from VB. I've done simple tasks, but would really like a tutorial to expand my knowledge (very limited knowledge).
Anybody know?
I did once try automating Word from Vb so that users of my application could print formatted documents. However, if you work for a company that has a problem with keeping everyone up to date with the same version of Word you may be wasting your time. Some of the menu operations work differently in different versions of Word.
Search on sites for Visual Basic for Applicatons (VBA). All of the office products use VBA. Another source would be purchasing a book on VBA. You can sometimes find these at the major book stores at a discounted price.
Try Helen Feddema's site on Word Automation. Most of the VBA code is Word to Access or Excel or Outlook or the reverse. Lots of examples. She has writen several book on topic.
http://www.ulster.net/~hfeddema
You can consider to make the automation from Word 97 and it will run on Word 2000, if you have to mantain compat.
In the project menu, select the references option and click on the Microsoft Word 8.0 Library to add it to your project.
After this you can see the help tips each time you type in a VBA command, just the same with VB functions. The help will guide you through your program.
<bold> Good Luck </Bold>
I developed a huge guide to all road races in South Africa. Used VB6 and took data from an Access DB to Word. I used DDE and woul recommend that you use DDE if your word Doc is not going to be over 50 pages long of pure small {font 8} text. At a certian stage DDE crashes because it has transferred too much data. I had to then close word and reopen it after every 70 road races or so. This created huge problems as opening and closing Word from VB proved to be the msingle most unstable thing I have ever seen. Especially when pescy macros want to get saved. So if its not a disgustingly huge app try searching for tuts on DDE from Microsoft.