Hi,
I have been asked to read e-mail messages (in outlook) using Navision (NAV 5.0 SP1).
I have been breaking my head over this since quite a few days but nothing positive has come out of
that. Has anyone ever tried this before or is anyone aware of how I could do it or possible lead me
in the correct direction.
All you support will be very much appreciated.
Thank you guys.....
A day without the sun is like night
0
Comments
Use the mailitem, here you can get anything from the mail: sender, recipients, subject.
To read the body of the mail, i save it als text ( mailitem.saveas(textfile.txt)) and i read them with an instream to a table. Works fine !
- create instance of Outlook
- navigate to the specific folder
- go to a specific email
- save the body of the email as a text file
- parse the text file line by line
- do whatever you have to do in NAV
I can send you some code samples later today when I have the time to dig it up.
and as u say, if its worked for all u guys, it must then work for me to....
thanks once again!!!
Can u pls send me the code snippets u were mentioning.
I cant seem to change or navigate to a folder......perhaps im missing a trick here!!
I'm completely new to Navision and one of my first tasks is to write a codeunit that reads mail's from Outlook 2010 using automation. The general idea is as follows:
The mail in specific form is received in outlook, Navision (Dynamics NAV 2009) reads data from mail (both subject and body) and writes it in NAV's SQLServer database as a new record in a table.
Can you please help a newbie jumpstart with some basic explanation of the proces and please post some code example.
Thanks!
I am also having similar issues reading e-mails from outlook.
I can read e-mails ok, so long as I have no appointments. If I do have an appointment is get the message 'Invalid assignment. It is not possible to assign a _MeetingItem to a MailItem.'
I just can't figure out how to filter out the appointments. All I want to read are the mails.
Any suggestions/ideas?
Cheers