Save As dialog for custom file type

S

Slow Flyer

Microsoft Office msoFileDialogSaveAs does not permit use
of .Filters.Add

Is there another dialog accessable to Word VBA which
accepts the show method and can be used for building the
pathname of a custom file type? e.g. a file with
extension .csv
 
S

Slow Flyer

Some broken code from the VBA hacker appears on MSDN
under the heading
"Enhance Your Apps with Common Dialogs"

I replaced

colFileNames.Add If(InStr(sTemp(nCount), _
sBackSlash), sTemp(nCount),
sPath & sBackSlash & sTemp(nCount))

with

If InStr(sTemp(nCount), sBackSlash) = 0 Then
colFileNames.Add sPath & sBackSlash & sTemp(nCount)
End If

and it seems to work.

A nice introduction to the windows API and VBA class
modules.

Detailed info on using this and other windows APIs are
also on MSDN
It took me a while to find so here's the route. Look
under:
MSDN
User Interface Design and Development
Windows Management
Windows User Interface
User Input
 

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