Chapter 23. Visio Automation and Microsoft Word 2000 Interaction

IN THIS CHAPTER

  • Sending Data to Word

  • Getting Data from Word

  • Querying Word for Visio's Use

  • Severing the Connection

As you have seen earlier, contacting Word within Visio can be done using one of three methods: GetObject(), CreateObject(), and New. The first of these presumes that Word is already up and running. The second and third assume nothing and will launch a new copy of Word, even if it is already running. Listing 23.1 shows the syntax of each.

Listing 23.1. The Syntax for GetObject, CreateObject, and New
 Public Sub RunWord1() Dim wordApp As Word.Application Set wordApp = GetObject(,"Word.Application") wordApp. Visible= True End Sub Public Sub RunWord2() Dim wordApp As Word.Application ...

Get Professional Development with Visio® 2000 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.