So when you use outlook to open an employee's calendar and then try
to add an appointment you can't add one or only when you try to use
your code? Use your standard Outlook session to test your permissions.
For a project like this I would usually use CDO to access the
Exchange server store directly, but since you are already using
Outlook automation stick with that. If you can't access the other
user calendars from an normal session of outlook then permissions are
probaly the issue. If this works then look for a setlogon or
username property of the Outlook application object. You may not be
passing the proper credentials. In my dealing with Outlook
automation it always grabbed the current users mail profile
automatically. I don't see why your app should be any different.
to add an appointment you can't add one or only when you try to use
your code? Use your standard Outlook session to test your permissions.
For a project like this I would usually use CDO to access the
Exchange server store directly, but since you are already using
Outlook automation stick with that. If you can't access the other
user calendars from an normal session of outlook then permissions are
probaly the issue. If this works then look for a setlogon or
username property of the Outlook application object. You may not be
passing the proper credentials. In my dealing with Outlook
automation it always grabbed the current users mail profile
automatically. I don't see why your app should be any different.
--- In vantage@y..., "hawkkt" <ktrapp@h...> wrote:
> I am working on a program that involves adding appointments
directly
> into other employee's Outlook calendars and into a calendar in the
> public folders section of Outlook. I want to be able to bypass all
> messaging so this is transparent to the employee.
>
> For permissions, I am the owner of the public calendar and I am a
> publishing editor for the employee's calendars. However I am not
> able to add an appointment to anyone's calendar except my own. Can
> someone help. VB code as follows for adding to public calendar.
Any
> ideas would be appreciated. Not sure if problem is in my code or a
> permissions / setup problem with Exchange.
>
> Private Sub cmdApprove_Click()
> Dim objFolder As Object
> Dim objRecipient As Outlook.Recipient
>
> Dim strPrivateCal As String
>
> Set gobjOutlook = New Outlook.Application
> Set gobjOutlookNS = gobjOutlook.GetNamespace("MAPI")
> Set gobjOutlookAppntItem = gobjOutlook.CreateItem
> (olAppointmentItem) 'create appointment
>
> With gobjOutlookAppntItem
> Set objFolder = gobjOutlookNS.Folders("Public
Folders").Folders
> ("All Public Folders").Folders("Vacation calendar")
>
>
> .Start = txtStartDate & " " & txtStartTime.Text
> .End = txtEndDate & " " & txtEndTime.Text
> .Subject = "test"
>
> If Not Null Then
> Body = txtBody.Text
> End If
>
> .Categories = "HTL"
> Set objRecipient = .Recipients.Add("Vacation
calendar")
>
> .Send
>
> txtMessageID = .EntryID
>
>
> End With
>
>
> Kim Trapp
> Hawk Technology Ltd