A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Outlook 2007: Show attendees dialog with vba



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 10th 08, 09:12 AM posted to microsoft.public.outlook.program_vba
Marc M.
external usenet poster
 
Posts: 1
Default Outlook 2007: Show attendees dialog with vba

Hello,

i hope someone can help me.
My problem is to generate an appointment in outlook with attendees.

My code is the following:


++++++++++++
Dim Outlook As New Outlook.Application

Dim Folder As Outlook.MAPIFolder
Set Folder = Application.Session.Folders("Öffentliche
Ordner").Folders("Alle Öffentlichen Ordner").Folders("Kalender")


Dim objTermin As Outlook.AppointmentItem

Set objTermin = Folder.Items.Add

With objTermin
.Recipients.Add ")
.Subject = "BetreffText"
.Body = "BodyText"
.Location = "OrtText"
.Start = Now
.End = Now + 1
.BusyStatus = 2
.ReminderSet = False
.Close 1
.Display
End With

objTermin.Display
++++++++++++

The problem is here, that the entry is correctly shown, but the
attendees dialog is not visible immediately.
I also have to manually press the button "invite attendee".
Am I able to activate the dialog with the vb code?

Thanks in advance.

Greetings
Marc
Ads
  #2  
Old September 10th 08, 03:41 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Outlook 2007: Show attendees dialog with vba

For Outlook 2007 you can execute the ribbon control for Invite Attendees to
produce the effect you want of the dialog opening. What you have to do is
get the Inspector for your item (objTermin.GetInspector) and get the
Inspector.CommandBars collection. Then you can call the ExecuteMso method on
the CommandBars object. The idMso for the control would be
"InviteAttendees", so the code would look something like this:

' other code

Dim colCB As Office.CommandBars
Dim oInsp As Outlook.Inspector

objTermin.Display

Set oInsp = objTermin.GetInspector
Set colCB = oInsp.CommandBars
colCB.ExecuteMso("InviteAttendees")

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Marc M." wrote in message
...
Hello,

i hope someone can help me.
My problem is to generate an appointment in outlook with attendees.

My code is the following:


++++++++++++
Dim Outlook As New Outlook.Application

Dim Folder As Outlook.MAPIFolder
Set Folder = Application.Session.Folders("Öffentliche
Ordner").Folders("Alle Öffentlichen Ordner").Folders("Kalender")


Dim objTermin As Outlook.AppointmentItem

Set objTermin = Folder.Items.Add

With objTermin
.Recipients.Add ")
.Subject = "BetreffText"
.Body = "BodyText"
.Location = "OrtText"
.Start = Now
.End = Now + 1
.BusyStatus = 2
.ReminderSet = False
.Close 1
.Display
End With

objTermin.Display
++++++++++++

The problem is here, that the entry is correctly shown, but the
attendees dialog is not visible immediately.
I also have to manually press the button "invite attendee".
Am I able to activate the dialog with the vb code?

Thanks in advance.

Greetings
Marc

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
outlook 2002 contacts do not show in address dialog Workoutman Outlook - Using Contacts 4 May 25th 08 02:52 PM
Inviting additional attendees - Dialog box missing after applying khanna Outlook - Calandaring 3 May 21st 08 12:56 PM
Send Update to Attendees dialog box behavior Omer Javed Add-ins for Outlook 1 January 8th 07 11:32 PM
Programmatically show the 'Flag for Follow up' dialog [email protected] Add-ins for Outlook 3 December 28th 06 03:36 PM
Required Attendees not show up Zenith Outlook - Calandaring 0 December 1st 06 05:10 AM


All times are GMT +1. The time now is 08:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.