By Creating a new function in codueint 397 (Mail) based on the "New Message". You need to add multiple "AttachfileName" routines.
When I did this it was referencing files on my local C drive that I had created by using "SAVEASHTML" and then sending these to my required contact.
Dean.
P.S. I found the code and it looks something like this....
IF AttachFileName2 = '' THEN
MAPIMessages.MsgNoteText := Body
ELSE BEGIN
MAPIMessages.MsgNoteText := Body + ' ';
MAPIMessages.AttachmentIndex := MAPIMessages.AttachmentCount;//Counts the no. of messages attached to the mail
MAPIMessages.AttachmentType := 0; //defines the attachment type as Data File
MAPIMessages.AttachmentPathName := AttachFileName2;
MAPIMessages.AttachmentPosition(STRLEN(Body));
END;
Thank you very much, this is indeed the place where it can be done. One problem. My MAPIHandler is declared as the following automation variable --> 'Navision Attain ApplicationHandler'.MAPIHandler'.
But for this variable I do not have the following properties: AttachmentIndex, AttachmentType,...
Does anybody know if this is het wrong variable declaration or something else I do wrong?
By the way, I'm working in 3.70. Mayby this is the cause? If this is the case, does anybody knows how to do it in this Version?
Hello everybody,
we were(are) having the same problem. Using this code works fine, so far, but only as long as we're not sending more then two attachments.
Is this Mapi-OCX limited to two attachments?? Or what are doing wrong?
We're attaching several different files (for example File A, File B, File C) for every Salesperson.
But we forgot to set the attachment position for every attached file, actually we were just giving one position (len(body) at the end of the "attachment-part" (like in the example).
Speaking of it; now we're having the problem that we can't send more then 18 attachments in one E-mail. Any suggestions?
Comments
By Creating a new function in codueint 397 (Mail) based on the "New Message". You need to add multiple "AttachfileName" routines.
When I did this it was referencing files on my local C drive that I had created by using "SAVEASHTML" and then sending these to my required contact.
Dean.
P.S. I found the code and it looks something like this....
IF AttachFileName2 = '' THEN
MAPIMessages.MsgNoteText := Body
ELSE BEGIN
MAPIMessages.MsgNoteText := Body + ' ';
MAPIMessages.AttachmentIndex := MAPIMessages.AttachmentCount;//Counts the no. of messages attached to the mail
MAPIMessages.AttachmentType := 0; //defines the attachment type as Data File
MAPIMessages.AttachmentPathName := AttachFileName2;
MAPIMessages.AttachmentPosition(STRLEN(Body));
END;
But for this variable I do not have the following properties: AttachmentIndex, AttachmentType,...
Does anybody know if this is het wrong variable declaration or something else I do wrong?
By the way, I'm working in 3.70. Mayby this is the cause? If this is the case, does anybody knows how to do it in this Version?
Greets,
R.
we were(are) having the same problem. Using this code works fine, so far, but only as long as we're not sending more then two attachments.
Is this Mapi-OCX limited to two attachments?? Or what are doing wrong?
](*,)
I can't imagine that the position of the attachment(s) will be important. :-k
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
But we forgot to set the attachment position for every attached file, actually we were just giving one position (len(body) at the end of the "attachment-part" (like in the example).
Speaking of it; now we're having the problem that we can't send more then 18 attachments in one E-mail. Any suggestions?