Return to site

Office macro save range to pdf for mac

broken image

The links to those specific posts are as follows: Upon request, I have made similar macros for other Office Applications you may use on a regular basis to convert their files into PDF documents. Same Macro Functionality For Other Office Applications ' caused by the original PDF file already being open.' MsgBox 'There was a problem saving your PDF. MsgBox 'PDF Saved in the Folder: ' & FolderName

broken image

Loop While ValidFileName(FileName) = FalseįileName:=CurrentFolder & FileName & '.pdf', _įolderName = Mid(.Path, InStrRev(.Path, '\') + 1, Len(.Path) - InStrRev(.Path, '\')) If FileName = 'False' Or FileName = '' Then Exit Sub '(will ask again if you provide an invalid file name)',, _ Click to Rename.', vbYesNoCancel)įileName = Application.InputBox('Provide New File Name ' & _ UserAnswer = MsgBox('File Already Exists! Click ' & _ InStrRev(myPath, '.') - InStrRev(myPath, '\') - 1)ĭirFile = CurrentFolder & FileName & '.pdf'

broken image
broken image

'NOTES: PDF Will Be Saved To Same Folder As Excel FileĬurrentFolder = ActiveWorkbook.Path & '\'įileName = Mid(myPath, InStrRev(myPath, '\') + 1, _ 'PURPOSE: Generate A PDF Document With Selected Worksheet(s)