7 Replies Latest reply on Nov 21, 2011 1:45 PM by philmodjunk

    Creating a PDF Email Error

    jeffd

      Title

      Creating a PDF Email Error

      Post

      I have a few machines running the Windows 7 & Outlook 2010. A script saves a record as .pdf & thens emails it as an attachement. Only on these PCs does an erroe occur when running this script. It states that "FileName.PDF" could not be created on this disk. Use a different name, make more room on the disk, unlock it or use .....

       

      Any suggestion of what may be causing this error to happen on only the PCs running the above?

        • 1. Re: Creating a PDF Email Error
          philmodjunk

          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.

          • 2. Re: Creating a PDF Email Error
            jeffd

             The output file path is a global variable called $$filename

            • 3. Re: Creating a PDF Email Error
              philmodjunk

              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.

              • 4. Re: Creating a PDF Email Error
                jeffd

                 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")

                • 5. Re: Creating a PDF Email Error
                  philmodjunk

                  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.

                  • 6. Re: Creating a PDF Email Error
                    jeffd

                     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.

                    Jeff

                    • 7. Re: Creating a PDF Email Error
                      philmodjunk

                      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.