View Single Post
 
Old 11-03-2015, 07:12 AM
brmveen brmveen is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Nov 2015
Posts: 2
brmveen is on a distinguished road
Default 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
Reply With Quote