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.