An implementation of Visual Basic that is built into Microsoft products.
Create a folder
David Rose
76
Reputation points
I have written a Word template in VBA that creates a document that has to be saved to a particular folder. The code for saving is:
Set FD = Application.FileDialog(msoFileDialogSaveAs)
With FD
.InitialFileName = strLocation
.Show
.Execute
End With
where strLocation defines the location and folder in which the document is to be saved.
If the folder is not found, I would like the VBA coding to detect that and create the folder, then save the document to that folder. I am not sure how to accomplish this in VBA. All help is truly appreciated.
TIA
David
Developer technologies | Visual Basic for Applications
Developer technologies | Visual Basic for Applications
Sign in to answer