J
J.R. Brown
I'm working with VS 2003 and Visio 2003, this code seems to work with
Visio 2002. Could it be a bug in 2003?
Steps in code:
1. Create Visio Application
2. Open Visio File
3. Export Visio as GIF format
4. Close Visio
Here is the code in question:
Dim vApp As New Visio.Application
Dim vDoc As Visio.Document
Dim vPage As Visio.Page
vDoc = vApp.Documents.Add("c:\test.vsd")
vPage = vDoc.Pages(1)
vPage.Export("c:\test.gif")
vApp.Quit()
vDoc = Nothing
vApp = Nothing
GC.Collect()
Simple eh? I can't imagine what is going on here. The part that really
bakes my noodle is that this code works in VBA running inside of
Visio. Thanks for any suggestions!
J.R.
PS. I'm using the latest PIA.
Visio 2002. Could it be a bug in 2003?
Steps in code:
1. Create Visio Application
2. Open Visio File
3. Export Visio as GIF format
4. Close Visio
Here is the code in question:
Dim vApp As New Visio.Application
Dim vDoc As Visio.Document
Dim vPage As Visio.Page
vDoc = vApp.Documents.Add("c:\test.vsd")
vPage = vDoc.Pages(1)
vPage.Export("c:\test.gif")
vApp.Quit()
vDoc = Nothing
vApp = Nothing
GC.Collect()
Simple eh? I can't imagine what is going on here. The part that really
bakes my noodle is that this code works in VBA running inside of
Visio. Thanks for any suggestions!
J.R.
PS. I'm using the latest PIA.