Hi,
static void AppointmentFrom
Outlook(Args _args)
{
COM sysOutlookCollection;
COM receipiants;
COM collection;
COMVariant comStartDate = new COMVariant();
COMVariant comEndDate = new COMVariant();
COM c;
#SysOutLookCOMDEF
#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_olFolderTasks);
collection = sysOutlookMAPIFolder.items();
c = collection.add();
comStartDate.date(today());
comStartDate.time(str2Time( "12:00:00"));
comEndDate.date(today());
comEndDate.time(str2Time( "12:15:00"));
c.subject("This is the subject");
c.body("Body of that msg");
c.save();
if (c)
{
receipiants = c.Recipients();
receipiants.add("mdalfasith@gmail.com");
receipiants.ResolveAll();
c.assign();
//c.display();
c.send();
info("Success msg in AX");
}
else
throw error("@SYS31969");
sysOutlookNameSpace.logoff();
}
Can you give an example scenario from end user perspective, how to use the subject code and get benefit of it.
ReplyDeleteHere I'm using COM (Common Object model) "C" tool as collections then adding the element in to the collection as C.subject(), C.Body() later am retrieving
Deleteso hope you got my explanation.