Read Outlook E-mail message from Navision

vrushankvrushank Member Posts: 16
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

Comments

  • JPHSCJPHSC Member Posts: 67
    Use the outlook automation object .. Here you can loop trough all the mails in your outlook folder.
    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 !
  • canadian_baconcanadian_bacon Member Posts: 91
    use Outlook automation:

    - 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.
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    This download can be useful: Outlook Automation tool
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • vrushankvrushank Member Posts: 16
    Thank u guys....i shall try the automation object.....
    and as u say, if its worked for all u guys, it must then work for me to....
    thanks once again!!!
    A day without the sun is like night
  • vrushankvrushank Member Posts: 16
    Dear Canadian_Bacon,
    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!!
    A day without the sun is like night
  • drago82drago82 Member Posts: 6
    Hi guys,
    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!
  • ColloCollo Member Posts: 12
    Hi

    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
Sign In or Register to comment.