Link to home
Start Free TrialLog in
Avatar of JohnNZExcel
JohnNZExcelFlag for New Zealand

asked on

Excel for Mac 2011 - Save as PDF to given filepath

Using Excel for Mac 2011 I have created a single page report that i want to save as a pdf using a macro.  I want to save to a folder called "Report" on the desktop.  On a PC i can use the GetOpenFilename command to select the folder and then the code will create a file with a specific filename (taken from a cell within the sheet).  I am having trouble doing this on a mac however - i know there is some commentary online about this matter but i have so far been unsuccessful.  
2 questions:
How to specify the filepath
VBA syntax for creating the pdf
Help and guidance would be appreciated.
Profile-Chart-Mac-PDF.xlsm
Avatar of bbao
bbao
Flag of Australia image

it seems not only you looking for a universal way to select a file using macro in Excel for both Windows and Mac.

first you need to apply all updates and patches for Excel 2011 for Mac, then if below discussion for details.

http://stackoverflow.com/questions/12263016/is-there-a-mac-pc-variant-of-application-getopenfilename
SOLUTION
Avatar of bbao
bbao
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JohnNZExcel

ASKER

Problem solved and knowledge gained.  Created 2 procedures: 1 using the mac script to choose a folder and the other to save to a predetermined folder in the documents area.  Many thanks to the gurus.