View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.office.developer.vba
Patrick Molloy[_2_] Patrick Molloy[_2_] is offline
external usenet poster
 
Posts: 1,298
Default Save As Dialog does not prompt for Web File Properties

have you considered using the

Application.GetSaveAsFilename
method?


" wrote:

I created some VBA code to Save an Excel workbook to a Sharepoint
Document Library.
When I use the file menu to save, after I click Save I am prompted to
enter values for the Web File Properties. Some of the properties are
custom and some are required.

The code below saves correctly but the Web File Properties dialog is
not displayed.

Thanks in advance!

Sub ShowSaveAsDialog()
Dim dlgSaveAs As FileDialog
Dim sPath As String

Set dlgSaveAs =
Application.FileDialog(FileDialogType:=msoFileDial ogSaveAs)
dlgSaveAs.InitialFileName = "http://hd.netropole.com/kb/Expense
Reports/" & Application.ActiveWorkbook.Name

dlgSaveAs.InitialView = msoFileDialogViewWebView

If dlgSaveAs.Show = -1 Then
sPath = dlgSaveAs.InitialFileName
Application.ActiveWorkbook.SaveAs sPath
End If

End Sub