Solved

Open attachement in mail if outlook is not open

Posted on 2010-08-26
3
282 Views
Last Modified: 2012-06-27
Hello experts,
I have a problem with my Dynamics NAV program. I use this to send an email using MAPI. For this I use the outlook libraries, and this works fine. However, I have one issue: if outlook is not open when I send the mail, I cannot open the attachments that I added to the mail. If outlook is open, I can open the attachments.

This is my code:
CREATE(autOutlookAPP, TRUE, TRUE);
autOutlookNamespace := autOutlookAPP.GetNamespace('MAPI');
autOutlookNamespace.Logon('','',TRUE,FALSE);

autOutlookItem := autOutlookAPP.CreateItem(0);
autOutlookItem.Subject( ... );

autOutlookAtts := autOutlookItem.Attachments;
autOutlookAtts.Add( '...' );

autOutlookItem.Display;

Open in new window


I suspect it has something to do with the logon (permissions), but I'm not sure. Do you have any ideas ?

Kind regards,
Andy

0
Comment
Question by:ACAE
  • 2
3 Comments
 
LVL 10

Expert Comment

by:MaduKp
ID: 33540223
Not sure about this. But will this helps you?
http://www.fontstuff.com/outlook/oltut01.htm

0
 

Accepted Solution

by:
ACAE earned 0 total points
ID: 33541234
Hi, I'm sorry this doesn't help me. I don't use macro's in outlook itself, I use outlook (in the background) to send a mail from another application.

Andy
0
 

Author Comment

by:ACAE
ID: 33565685
Hello,
Is there another expert with a possible solution ?
Andy
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PHP contact form that lets the user to contact the company through email contact form. A button is fixed at the bottom of site, on clicking a new window will open where a user can send the email.
How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question