I want a create PDF file,
-
with local path. file path was stored in a SMTP table.
- saved file using save as pdf function
- when I want attach the file
- name is breking into line like d:\temp\invoice.pdf like

- temp
- Invoice.pdf
Please help me how to retrive file from path
Warm regards
Krsh
Answers
Actually I want my file name should be for example 'D:\temp\invoice.pdf'
not
like this
d:
Temp
Invoice.pdf
Please help me,
Kris
SMTPsetup.GET;
SenderName:=SMTPsetup."Email sender Name";
SenderAddress:=SMTPsetup."Email sender email";
Recipients:=vendorRec."E-Mail"+';'+SMTPsetup."Manager Email";
kSubject:="No."+' PO for '+FORMAT(Amount);
kBody:=' ';
Tofile := Name;
Tofile := "No."+'.pdf';
FileName := SMTPsetup."Path to Save Report" + Tofile;
FileName := CONVERTSTR(FileName,'/','\');
MESSAGE(CONVERTSTR(FileName,'/','\'));
CurrPage.SETSELECTIONFILTER(Rec);
REPORT.SAVEASPDF(405, FileName, Rec);
CLEAR(email);
email.CreateMessage(Recipients,'','',kSubject,kBody,FALSE,FALSE);
email.AddBodyline(' Dear Sir/Madam');
email.AddBodyline('<BR><BR>');
email.AddBodyline(' PO Document '+"No."+' '+"Pay-to Name"+' approved ');
email.AddBodyline('<BR><BR>');
email.AddBodyline('Operations');
email.AddBodyline('<BR><BR>');
email.AddBodyline('Shura');
email.AttachFile(FileName);
email.Send();
i am i right?
For displaying in a message though, it doesn't really matter I would have thought.
No! Windows handles forward slashes just all right as path separators in file paths. Many programs do not, though. On the command line, you need to quote a path containing forward slashes, because the forward slash is the traditional option start character on DOS/Windows command lines.
Back to NAV: For a MESSAGE command to display a file path properly, use value substitution: Backslashes in the String parameter get converted to Newlines, backslashes in the Valuen parameters are preserved. (See link above.)
With appending the file to the eMail message, I did not have any issue. No conversion needs to be done. It won't hurt, though, because of what I said in the beginning.