Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / VS Tools for Office / March 2005

Tip: Looking for answers? Try searching our database.

insert Visio drawing porgrammatically into Word

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
paul meaney - 14 Mar 2005 18:37 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.