ExportToPDF - Using a variable in the PDF name?

Discussion created by Neal94 on Jul 23, 2011
Latest reply on Jul 23, 2011 by Neal94

I'm trying to use a variable as a part of the PDF to be created, but I get an error that the destination path is not valid.

ExportToPDF(mxd, mappath + NHName + '_map.pdf')

mappath is the folder path to where I want the PDF created, and NHName is the variable that I want within the PDF's file name.

Thanks for any help!