December 1999
Intermediate to advanced
480 pages
11h 5m
English
Obtaining text from Word to pass back to Visio is a matter of collecting the text you want and assigning it to a string variable. Then you can pass that reference to the text property of the subject's Visio SmartShape symbol. You can select the entire document's text as in
Selection.WholeStory
Selection.Copy
Or if text has already been selected:
Selection.Copy
To programmatically select text in a Word document, you will need to make use of both the selection object and the range object.
Here is an example of selecting the first paragraph of the document:
ActiveDocument.Paragraphs(1).Range.Select
Here is another example in which you select the character count from a specific point within the document to an ending point: ...
Read now
Unlock full access