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
LVL 1
Stephen ByromWarehouse/ShippingAsked:
Who is Participating?
 
krishnakrkcConnect With a Mentor Commented:
Does this

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

Open in new window


help you ?
0
 
Stephen ByromWarehouse/ShippingAuthor Commented:
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.
0
 
Stephen ByromWarehouse/ShippingAuthor Commented:
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
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.