As promised, here a simple example how to create an appointment via automation in someone else calender. One of the things i still need te know is how to set the flag "SHOW TIME AS", but i'll keep searching.
With thanks to Fozzie and his collegue !!!!!!!!
Automation Globals
Autapp:'Microsoft Outlook 9.0 Object Library'.Application
Autns:'Microsoft Outlook 9.0 Object Library'.NameSpace
Autrec:'Microsoft Outlook 9.0 Object Library'.Recipient
Autfolder:'Microsoft Outlook 9.0 Object Library'.MAPIFolder
autitem:'Microsoft Outlook 9.0 Object Library'.AppointmentItem
OCX Global
DATETIME OCX DateTimeConversion.DateTime
PS. This OCX is from the download on this site. Simply extract the ocx and register it in Financials
CREATE(Autapp);
Autns := Autapp.GetNamespace('MAPI');
Autrec := Autns.CreateRecipient('TESTUSER'); //Name used in mailserver
Autrec.Resolve;
Autfolder := Autns.GetSharedDefaultFolder(Autrec,9);
autitem := Autapp.CreateItem(1);
autitem.Subject('TESTSUBJECT');
stdate := '01/02/00';
sttime := '12:00:00';
DATETIME.SetStart(autitem,stdate,sttime);
sttime := '13:00:00';
DATETIME.SetEnd(autitem,stdate,sttime);
autitem.Move(Autfolder);
autitem.Close(0);
CLEAR(Autapp);
Hope that this is helpfull for someone !!
Rgds
Benny Giebens
[This message has been edited by BennyGiebens (edited 31-01-2000).]
Rgds
Benny Giebens
0
Comments
May the source be with you
OutlookAftale.BusyStatus := Status;
Status is an option, with optiostring:
Availeble,For the time beeing,Busy,Out of office
* I'm not sure if my option string are right, as I am using a Danish Version <img border="0" title="" alt="" src="images/smiles/icon_smile.gif" />
Kind Regards
Henrik Helgesen,
Navision Solution Developer
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Great Minds Discuss Ideas,
Average minds discuss events
Small minds discuss people (With Malicious Intention)
Admiral Hyman Rickover, US Navy<HR></BLOCKQUOTE>
Henrik Helgesen,
President | Helgesen Consulting
about.me | LinkedIN
Rgds
Benny Giebens
Benny Giebens
The call to Getshareddefaultfolder failed.MS Outlook returned the error OPeration Failed.
Please help