Hi,
Im using NAV 4.0, I want to send email through Quote card..
place on button 'Send eMail', when i click the button i need to send the quote details..
Question is i do not want to see the outlook screen, once i click the button it should be automatically attached the Quote details with 'To' address(capture from 'sell to customer' email address) and send it. Client is using Outlook2003
Is there any configuration required in code using(397) ??
Suggestion Please !!!
Thanks & Regards,
Psk
0
Comments
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
How can i attach the Quote details ??? can you plz let me know which is the right way to sending the Quote details to customer !!!!
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Second, if i generating the file manually for attachment, how do i attach the file while calling 'NewMessage' function ???
because the 'Attachement' parameter is TEXT type, how can i specify the file/file path which i can send for attachment ??
assume i hav the file in 'C:\Quote.pdf'
Mail (397) Codeunit is available in navision. There many codings has been written for each properties in Outlook. Just look into it whether u can use same coding or some additional coding required...
http://www.mibuso.com/forum/viewtopic.php?f=23&t=18513&hilit=PDF+creator
in that u vl specify the path wre u want to save the re[ort
give the same path in newmesage function
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Mail.CreateMessage(MyName,MyEmailAddress,reciep@to.com,Quote,'See Attachement',HtmlFormatted);
Mail.AddAttachment('MyFreshlyPrintedPDF.pdf');
Mail.Send;
for this we need to set SMTP setup
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
There is also a packaged solution for PDF and mail by Altus (see: http://www.altusbusinesssolutions.com/) which allows you to fax and email from multiple areas in NAV.
Epimatic Corp.
http://www.epimatic.com
To get you started :
Here is the code I use for PDF Creator :
IF ISCLEAR(PDFCreator) THEN
CREATE(PDFCreator);
IF PDFCreator.cStart('/NoProcessingAtStartup',TRUE) = FALSE THEN
ERROR('FOUT');
IF PrintOption = PrintOption::Mail THEN BEGIN // Save it automatically ...
PDFCreator.cOption('UseAutosave', 1);
PDFCreator.cOption('UseAutosaveDirectory', 1);
PDFCreator.cOption('AutosaveDirectory', vPath);
PDFCreator.cOption('AutosaveFormat', 0);
PDFCreator.cOption('AutosaveFilename', vFileName);
END ELSE BEGIN // Use Pop up to save to file
PDFCreator.cOption('UseAutosave', 0);
PDFCreator.cOption('UseAutosaveDirectory', 0);
END;
varDefaultPrinter := PDFCreator.cDefaultPrinter;
PDFCreator.cDefaultPrinter := 'PDFCreator';
PDFCreator.cClearCache();
PDFCreator.cPrinterStop := FALSE;
Report.Runmodal(Report, FALSE, FALSE, Record);
PDFCreator.cDefaultPrinter := varDefaultPrinter;
Clear(PDFCreator);
Big doubt , for creating automaic pdf file while clicking 'send email' button on quote form.
where do i place the code link below
See this link to Print PDF File...
http://www.mibuso.com/forum/viewtopic.p ... DF+creator
:whistle:
lets say that the salesperson on the quote sends the mail
Something like this should do the trick
but how to declare the variable "PDFCreator", Which type / Class ??
i couldn't find any class in "Adobe Acrobat 8.0 Type Library" in type 'Automation'
Can you plz let me know the DECLARATION OF 'PDFCreator' variable ???
you download and install PDFCreator http://www.pdfforge.org/products/pdfcreator
then you can find it between the automation variables ...
Excellent, Working Fine.
Can you plz suggest me How to send the same "Report " to FAX ???
Set the topic to solved
Reg; Mail:
I used code unit:397,
In case if i need to set SMPT then which code unit i can choose, as per ur ref: i couldn't find Code Unit :400 in NAV 4.0
Wht is the alternative?
SMTP function is added in 5.0
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
i havenot tried this.
DO this by taking suggetions from any one who has done before
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Is there any posibility to copy the respected DLL and register it in NAV 4.0 ???
and wht is the alternative other than installing 5 ver. Because some time mail is not sending when i m using Outlook(code unit:397)
when i send the email with pdf attach...mail will be sitting on the outlook 'DRAFT', not been sent to the receipnt.
I use the code:
bMailSent := cSendmail.NewMessage(sToID,sCCID,sSubject,sBody,sAttachPath + sAttachFile,FALSE);
I don't know y it is not sending with attach pdf. is any wait option is required or else any key hav to set !!!
Second, After sending the mail 'PDF creater' is running, so i couldn't access the NAV screen, once i close it through task bar icon(right click) then i can access NAV.
If i put the code "PDFCreator.cClose" after sending mail, throwing error 'Automation variable not been instantiated ...' something like...