Save Dialog box macro code getting an error when saving in desktop
Hi,
I am tried a Macro Code for "Save Dialog Box", and using the below macro code.
But when i creating save folder path in Desktop it is generating an error. Now i wanted to remove that error and allow the user to save in Desktop also.
How can i do it and what modification should i done in the below macro.
Any one help on this.
Function SaveXML()
set vDataSet = ActiveDocument.Variables("vDataSet")
set vBMname = ActiveDocument.Variables("vBookVar")
Dim objShell
Dim ssfWINDOWS
Dim objFolder
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.BrowseForFolder(0, "Example Select Folder", 0, strRootPath)
If (Not objFolder Is Nothing) Then
If objFolder.Title = "Desktop" Then
MSGBOX "Out Put File Can't Create in Desktop! Sorry for the inconvenience"
ELSE
''IF objFolder.ParentFolder.ParseName(objFolder.Title).Path = " " THEN