web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Create Outlook Appointment with signature

(0) ShareShare
ReportReport
Posted on by

Hello Experts,

how to insert image or signature in Outlook appointment body through x++ code?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Denis Macchinetti Profile Picture
    16,444 on at

    Hi Sivas

    I guess you have to use the COM Application.

    For instance take a look to the SmmOutlookEMail Class.

  • Community Member Profile Picture
    on at

    Hi Denis,

    thanks for the reply, yeah i saw that SmmOutlookEmail Class used for creating for new mail not for appointment or Meeting request.  i am using COM Application When i add bodyHtml() method that time i got an error like "Method ,'bodyhtml' is not supported by the Automation interface of the COM object of class '_AppointmentItem'."

  • Suggested answer
    Mea_ Profile Picture
    60,284 on at

    Hi SivaS,

    This is not an AX specific question and I don't think there is an easy answer from what I was able to find

    stackoverflow.com/.../outlook-appointmentitem-how-do-i-programmatically-add-rtf-to-its-body

    www.experts-exchange.com/.../How-do-I-insert-HTML-code-to-Outlook-AppointmentItem-body.html

  • Community Member Profile Picture
    on at

    Hello ievgen,

    below code am using for insert image in Outlook .

    static void OutlookAppoinment(Args _args)

    {

       COM        sysOutlookCollection;

       COM        item;

       COM        collection;

       COM        receipiants;

       COMVariant comStartDate = new COMVariant();

       COMVariant comEndDate   = new COMVariant();

       COM        c;

       #SysOutLookCOMDEF

       #smmMSOutlook2002ObjectModelConstants

       #define.mapi("MAPI")

       #define.outlook("Outlook.Application")

       COM        sysOutlook;

       COM        sysOutlookNameSpace;

       COM        sysOutlookMAPIFolder;

       sysOutlook                  = new COM(#outlook);

       sysOutlookNameSpace         = sysOutlook.getNamespace(#mapi);

       sysOutlookNameSpace.logon();

       sysOutlookMAPIFolder        = sysOutlookNameSpace.getDefaultFolder(#OlDefaultFolders_olFolderCalendar);

       collection                  = sysOutlookMAPIFolder.items();

       c = collection.add();

       comStartDate.date(today());

       comStartDate.time(str2Time( "12:00:00"));

       comEndDate.date(today());

       comEndDate.time(str2Time( "12:45:00"));

       c.location('CONHALL');

       c.subject('AXInterview');

       c.body('Lets discuss on candidate profile');

       c.bodyFormat(#olFormatHTML);

       c.htmlBody('<img src="test.jpg"\>');

       c.start(comStartDate);

       c.end(comEndDate);

       c.RequiredAttendees('YourID');

       c.ReminderMinutesBeforeStart(20);

       c.save();

           if (c)

           {

               receipiants = c.Recipients();

               receipiants.add("OpponentID");

               info("Appointment is created in Microsoft Outlook");

               receipiants.ResolveAll();

               c.display();

               c.finalize();

           }

           else

               throw error("@SYS31969");

               sysOutlookNameSpace.logoff();

    }

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans