Open File Dialog

K

Ken

I am using visio 2003. How do I create a open file dialog that the user can
select a file with an extension of *.scn.

Thanks.
 
N

Nikolay Belyh

I am using visio 2003. How do I create a open file dialog that the user can
select a file with an extension of *.scn.

Thanks.

Unfortunately, Visio does not provide Application.FileDialog method
like other Office applications like Excel or Word do.

Here are some options you might want to choose instead:

1. Use Excel's or Word's or OtherOfficeApplication's FileDialog
from Visio VBA like that:

Dim excel_app = CreateObject("Excel.Application")
Set fd = excel_app.FileDialog
' customize file dialog here
fd.Show

The obvious drawbacks are perfomance
(you need to rise up the whole Excel to show the single dialog)
and the fact that you need Excel installed.
The advantage is simplicity.

2. Use "native" Windows dialogs.
The drawback here is introduction of a "crippled code",
the advantage is that you won't need anyhing except Visio.
The example:
http://officeone.mvps.org/vba/display_file_open_common_dialog.html

3. Use "Common dialogs" control
(if you have a form).

4. Write addin for Visio that supplies FileDialog functionality (in
hardcore C++),
and make it available to the community. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top