Hi I'm trying to insert a .vsd into word. I'm assuming it's using the
word.range.insertFile() call, but can anyone tell me what paramters I
need to pass as wella s the filename? I'm assuming I need to bing the
object to Vision, but how do I do this?
thanks,
Paul
Ken in Indianapolis - 23 Mar 2005 22:55 GMT
Here is some VB 6 code I have used to insert Visio diagrams into Word
documents. Rather than doing an "insert file", I open Visio, copy the chart
and paste it into my document. It looks much better than inserting a file
(the charts look really fuzzy when inserted as a file.
BookMarkName is a bookmark within the Word document and FileToOpen is the
name of the .vsd file
Set appVisio = CreateObject("Visio.Application")
appVisio.Visible = True
appWord.Selection.GoTo What:=wdGoToBookmark, Name:=BookMarkName
appVisio.Documents.Open FileName:=FileToOpen
appVisio.Windows.Item(1).SelectAll
appVisio.Windows.Item(1).Selection.Copy
appWord.Selection.TypeParagraph
appWord.Selection.Paste
appVisio.Windows.Item(1).Close
appVisio.Quit
Hope this helps.
- Ken
> Hi I'm trying to insert a .vsd into word. I'm assuming it's using the
> word.range.insertFile() call, but can anyone tell me what paramters I
[quoted text clipped - 4 lines]
>
> Paul