The error message only tells us that the script was unable to save the PDF to the specified name and location. You'll need to investigate why it was unable to do so.
Saving to a directory that does not exist could be the issue. If this works on macs and not windows machines, check to make sure the filepath is valid in windows. If it works on XP systems and not windows 7, check to see if you have write permission for the directory were you are saving the PDF.
The output file path is a global variable called $$filename
yes but what data is entered into $$filename?
If this is a relative path reference where all you put in the variable is "FileName.pdf", then check to see if the location where you have put the actual database file permits writing to the same directory.
YOu may need to specify a location for the PDF to make sure that it is saved to a location that permits the "write" action to it.
The data is a simple save as a pdf from a single layout and the attachment name is;
Upper (Filter (Contact Management::Company; "ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz")&" "&Sales Alabama::Equipment Description_1&" "&"Sales Documents.pdf")
Try this as a test:
Set Variable [$$fileName ; value: "file:" & Get ( DesktopPath ) & "test.PDF"]
Save Records As PDF [Restore ; no dialog ; $$filename ; automatically open ; ....
This will create a copy of the PDF, named "test" on your desktop where we can be sure you have write permission.
Note that in this test, the variable need not be a global variable, you could use $filename inplace of $$Filename and get the same results.
This saving to the desktop method does work better than my method but what I discovered in this process that and Add-In to 2010 Outlook called "Pdfmoutlook" has to be disabled in outlook for this to work properly.
Thanks Again for all of your help sir.
You don't have to save to the desktop, it was just a way to set up a starting point to explore what detail was keeping it from working. I'd save PDF's I don't want to keep around to the temporary items folder and to a designated folder if I did want to keep them.
Let me know if you have any more questions.