Link to home
Start Free TrialLog in
Avatar of Stephen Byrom
Stephen ByromFlag for Ireland

asked on

Excel range to PDF

Hi
I'm trying to export a range from an excel spreadsheet to My Documents in PDF format.
The range contains a number of charts. I have tried a few variations of the following code to no avail;

Range("SummaryChart").ExportAsFixedFormat 0, "C:\Documents" & Range("F1").Value & ".pdf", 0

(Range F1 contains the name I would like the file to be named as)
Any advice is appreciated.
Thanks
ASKER CERTIFIED SOLUTION
Avatar of krishnakrkc
krishnakrkc
Flag of India 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
Avatar of Stephen Byrom

ASKER

Thanks for the response.
Apart from the backslash after the word "Documents" it isn't really that much different, but I'm afraid it still throws up an error.I'm using Excel 2010 if that's significant.
Hi,
I managed to work around the error. I simplified the string expression in F1 (made it shorter really) and it worked fine.
Thanks for your time