Excel range to PDF

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.
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 ?
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.
Stephen ByromWarehouse/ShippingAuthor Commented:
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
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.