Filtering msoFileDialogSaveAs


N

Nick Porter

Hi All,

Is it possible to Filter the "Save As" dialog (msoFileDialogSaveAs) through
VBA in Word?

When I try:

Set dlg = objWord.FileDialog(msoFileDialogSaveAs)
With dlg
.InitialFileName = "http://SharepointServer/Site/"
.InitialView = msoFileDialogViewWebView
.Title = "Save to Document Library..."
.Filters.Clear
.Filters.Add "Outlook", "*.msg"

I receive the error:

Run-time error '438':
Object doesn't support this property or method


Really just looking for confirmation and/or any workarounds?

Kind Regards

Nick.
 
Ad

Advertisements

H

Helmut Weber

Hi Nick,
Run-time error '438':
Object doesn't support this property or method
Really just looking for confirmation and/or
any workarounds?
Confirmed.
Maybe you can use msoFileDialogFilePicker,
like this:
---
Dim dlg As FileDialog
Set dlg = Application.FileDialog(msoFileDialogFilePicker)
With dlg
.InitialFileName = "http://SharepointServer/Site/"
.InitialView = msoFileDialogViewWebView
.Title = "Save to Document Library..."
.Filters.Clear
.Filters.Add "Outlook", "*.msg"
.Show
End With
 
Ad

Advertisements

Joined
Jan 12, 2021
Messages
1
Reaction score
0
Same error here.
The workaround to change msoFileDialogSaveAs to msoFileDialogFilePicker is not really a good one: I don't want to open/select a file but enter a new one.
 

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