How to control file extension before save as

K

Kumar Pandey

We have developed a stencil and template file for custom drawing.

When a user opens a new document using that template and does the first
save, save as dialog
opens . I want to capture this event so that I can update the file name in
the text field to say
Drawing1.vdx ( we want the user to save it as .vdx).

How do I go about doing this? I handle
Visio.Application.BeforeDocumentSaveAs but this
gets invoked only after the save as dialog box is displayed.

Visio.Application.DocumentSavedAs(ByVal doc As IVDocument) gives me access
to the doc. However
doc.Name is a readonly field.

Basic requiremtent is to default the file extension to .vdx when a user
tries to save a new document as oppose to
the .vsd visio defaults to.

Thanks
Kumar Pandey
 
A

Al Edlund

You might consider that rather than using the visio saveas dialog consider
using the common dialog instead which has more granularity and see if that
meets your needs.
al
 
K

Kumar Pandey

I can trap BeforeModal at application level whihc is triggered before the
modal dialog comes up. How do I open a common dialog here and make sure that
other
one doesn't open.

Thanks
 
K

Kumar Pandey

theApp.Settings.DefaultSaveFormat = visDefaultSaveCurrentXML

solves the problem.
 

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