I want to ensure that the user does NOT select any other "Save as type"
other than "Word Document *.doc", to ensure that the macros are
retained in the file. So..........

I am displaying the Save As Dialog Box.

I thought I would interpret what "Save as type" the user has selected, and in
the case of them selecting anything other than "Word Document *.doc" generate
an error message box, and then NOT execute the Save dialog.

I thought that the property "Dialogs(wdDialogFileSaveAs).Format" would
return the user selection, but it does not.

What property or method can I use to obtain the user selected "Save as type"?
Or - if there's a better way to ensure that an original Word document is
always
saved as a "Word Document *.doc" regardless of name and/or location, I
would enjoy hearing about those options as well.

Thanks in advance!

Re: Obtaining "Save as type" (user input) value from Save As Dialog Bo by Julie

Julie
Sun Oct 24 10:39:40 CDT 2004


What version of Word?

Try this (word 2k/Word xp),

With Dialogs(wdDialogFileSaveAs)
.Display

If .Format <> 0 Then
MsgBox "Not permitted"
Else
.Execute
End If

End With


"Graig" <Graig@discussions.microsoft.com> wrote in message
news:78889CB2-65B4-4EA4-893D-BD2039BBAA28@microsoft.com...
>I want to ensure that the user does NOT select any other "Save as type"
> other than "Word Document *.doc", to ensure that the macros are
> retained in the file. So..........
>
> I am displaying the Save As Dialog Box.
>
> I thought I would interpret what "Save as type" the user has selected, and
> in
> the case of them selecting anything other than "Word Document *.doc"
> generate
> an error message box, and then NOT execute the Save dialog.
>
> I thought that the property "Dialogs(wdDialogFileSaveAs).Format" would
> return the user selection, but it does not.
>
> What property or method can I use to obtain the user selected "Save as
> type"?
> Or - if there's a better way to ensure that an original Word document is
> always
> saved as a "Word Document *.doc" regardless of name and/or location, I
> would enjoy hearing about those options as well.
>
> Thanks in advance!
>