Is the following code valid under MS VBScript environment?
Sub CreateNewAppointment()
Dim olApp As Outlook.Application
Dim olNewMeeting As Outlook.AppointmentItem
Set olApplication = GetObject("","Outlook.Application")
Set olns = olApplication.GetNamespace("MAPI")
Set olApp = New Outlook.Application
Set olNewMeeting = olApp.Creation(olAppointmentItem)
With olNewMeeting
.Recipients.Add "Marcus"
.Start = XXXXXXXXXXXXXXXXX
.Duration = 10
.Importance = olImportanceHigh
.Subject = "Macro Scheduler"
.Save
End With
End Sub
BTW, how could I assign the current date and time to olNewMeeting.Start?
Thanks in advance.
Outlook VBScript: Sub CreateNewAppointment()
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Yes, I believe that should work - did you get this from scripts 'n tips? There's something similar there. You can supply a date/time to .Start. See the following page for details of the format required:
http://www.microsoft.com/technet/script ... s0405.mspx
http://www.microsoft.com/technet/script ... s0405.mspx
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?