Solved

Open attachement in mail if outlook is not open

Posted on 2010-08-26
3
280 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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
If you don't know how to downgrade, my instructions below should be helpful.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

862 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now