Article ID: 177216
Article Last Modified on 10/11/2006
Private Sub Command1_Click()
Dim objApp As Object
Dim objSched As Object
Dim objOneRecip As Object
Dim objSession As Object
Dim objMessage As Object
'Create a Schedule+ Object
Set objApp = CreateObject("SchedulePlus.Application")
' Specify a valid profile name for "My Profile"
objApp.Logon profilename:="My Profile"
'Create a MAPI Session
Set objSession = CreateObject("MAPI.Session")
objSession.Logon profilename:="My Profile"
'Setup Recipient Object for the user whose schedule you
'want to open
Set objMessage = objSession.OutBox.Messages.Add
Set objOneRecip = objMessage.Recipients.Add
objOneRecip.Name = "Bugs Bunny"
objOneRecip.Type = 1
'Create a valid EntryId for the ScheduleForUser call
objOneRecip.Resolve
'Open User's Schedule
Set objSched = _
objApp.ScheduleForUser(objOneRecip.AddressEntry.Type _
+ ":" + objOneRecip.AddressEntry.Address, _
objOneRecip.AddressEntry.Name, 1, 3, _
objOneRecip.AddressEntry.ID)
'Print information for user to show you are attached to
'another schedule
Debug.Print objSched.UserName
MsgBox (objSched.UserAddress)
'Log off of Mail and Schedule+ and release the objects
objSession.Logoff
objApp.Logoff
Set objOneRecip = Nothing
Set objMessage = Nothing
Set objSched = Nothing
Set objSession = Nothing
End Sub
141066 WSPlus: How to Force Schedule+ 7.0 to Ask to Work in Group
Keywords: kbhowto kbprogramming KB177216