By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,491 Members | 3,273 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,491 IT Pros & Developers. It's quick & easy.

Problem with automatically sending an Outlook appointment generated in VB in Access 97

P: n/a
Hello all!

I have created a function in VB which generate appointment in Outlook.
Everything is OK, except one thing. I cannot send it automatically using a
button in Access, because I don`t know what is the code to send it
automatically. I noticed that if I click on Calendar>"click on selected
appointment">menu>Appointment>Invite Atendees everything is going well and
this appointment is sent to attendees given on the list.
My question is - what is the visual basic code of Invite atendees operation
given in Outlook???

Unfortunately this code below isn`t working as I would like it to work:

Dim olApp As Outlook.Application
Dim olNS As Outlook.NameSpace
Dim olFolder As Outlook.MAPIFolder
Dim olItems As Outlook.Items
Dim olAppt As Outlook.AppointmentItem

Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set olFolder = olNS.GetDefaultFolder(olFolderCalendar)
Set olItems = olFolder.Items
Set olAppt = olItems.Add
With olAppt
.Start = "09-01-04 8:30 AM"
.End = "09-01-04 9:30 AM"
.Subject = "hi there"
.ReminderMinutesBeforeStart = "15"
.SAVE
.SEND
End With

Operation .SAVE and .SEND don`t send this appointments to atendees.

Thank you in advance
Marcin from Poland


Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I could be wrong, but I would imagine that you'd get a lot more useful
responses in the Outlook NG...
Nov 13 '05 #2

P: n/a
I know what it was. I had to change appointment into meeting.
Here is the code

'CHANGE APPOINMENT ITEM TO A MEETING
objAppt.MeetingStatus = Outlook.OlMeetingStatus.olMeeting

When I added everything went ok.

Marcin
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.