|
-
July 24th, 2009, 01:24 PM
#1
VB .NET to open Visio
I have a question.
I am creating a VB .NET application that opens Visio to do some stuff there. Visio runs a splash screen on startup and the only way to stop the splash screen from loading is to use code like:
"C:\Program Files\Microsoft Office\Visio10\Visio.exe" /nologo
"C:\Program Files\Microsoft Office\Visio11\Visio.exe" /nologo
"C:\Program Files\Microsoft Office\Visio12\Visio.exe" /nologo
for each Visio versions in the command line (but I am not using the command line).
The problem I am having is that I can't run this code from my vb .net application, because my application uses the following code to load Visio:
Dim vsoApplication As Application
vsoApplication = New Visio.Application()
vsoApplication.Visible = False
and I do not know how to call the "/nologo" feature on loading time from my code to skip the Visio splash screen.
Any help is highly appreciated.
"We are what we repeatedly do. Excellence, therefore, is not an act, but a habit.", Aristotle
-
July 24th, 2009, 07:47 PM
#2
Re: VB .NET to open Visio
Look up Process.Start()
It lets you call programs with parameters
-
July 25th, 2009, 05:37 AM
#3
Re: VB .NET to open Visio
You could also try the ProcessInfo object as well
-
July 27th, 2009, 11:29 AM
#4
Re: VB .NET to open Visio
Thank you for your replies.
Using the ProcessStartInfo functionality helps in hiding Visio's splash screen, but in my code I have a variable called:
Public vsoApplication As Microsoft.Office.Interop.Visio.Application
and this variable is used everywhere to enable Visio's functions.
I am having problems associating the newly started visio process that I started using the ProcessStartInfo functionality with the vsoApplication object, so that I can use it in my code.
So is there a way to identify the process type and get the application associated with that type and assign it to the vsoApplication variable?
Can you please help me resolve that?
Thanks.
"We are what we repeatedly do. Excellence, therefore, is not an act, but a habit.", Aristotle
-
May 25th, 2012, 01:54 AM
#5
Re: VB .NET to open Visio
You can use the InvisibleApp class.
Imports Visio = Microsoft.Office.Interop.Visio
Dim vsoApplication As Visio.InvisibleApp
instead of
Dim vsoApplication As Visio.Application
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|