#1
|
|||
|
|||
save dialog box promt doesn't save file
For some reason the file doesn't get saved.
HTML Code:
Function saveFile() Dim strFileName As String Dim StrPath As String Dim instance As WdSaveFormat Dim format As String 'provide a file type format = wdFormatXMLDocumentMacroEnabled 'provide default filename saveName = "test124.docm" 'provide a path pathFull = "C:\temp\" 'concat path StrPath = pathFull & saveName With Dialogs(wdDialogFileSaveAs) .Name = StrPath .format = format If .Display <> 0 Then MsgBox ("thanks") Else strFileName = "User Cancelled" End If End With End Function Sub Test() Call saveFile End Sub |
#2
|
||||
|
||||
Try changing .Display to .Show. You might also use the variables you've defined instead of defining them then using undefined variable names instead...
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Changing to .show actually works. I'm a bit surprised because I didn't think to look in that part of code because that partially worked. Changing the format to pdf en keeping .display worked.
Thanks a million! did some research: the difference makes a bit more sence now: .display only display the menu, sort of a view only thing (can even be timed) .show shows and executes the menu. https://msdn.microsoft.com/en-us/lib.../dn320601.aspx |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to deactivate File Save dialog box | KIM SOLIS | Word | 3 | 12-15-2013 12:30 PM |
Save as and Open dialog boxes blank | stuartmush | Word | 1 | 09-20-2013 03:04 PM |
When I try to save an existing word doc, save as pops up and will not save... | samanthab | Word | 3 | 01-19-2013 06:27 AM |
Can Save As dialog be suppressed? | dug_down_deep | PowerPoint | 0 | 10-05-2010 09:46 AM |
Promt for save location when sendimg mail | blegs38552 | Outlook | 0 | 01-31-2010 07:29 AM |