Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / April 2005

Tip: Looking for answers? Try searching our database.

Copy Appointment Item

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ben Crinion - 28 Apr 2005 11:32 GMT
Hi

I have a custom appointment form(SMSAppointment)  which has a extra tab on
it. Customers are complaining because when they send a meeting request to
someone the new appointment form is installed on the recipients machine as
the default appointment form.

Dimtry suggested setting the field to nothing but the code (see below) he
sent doesnt work and i dont understand it to juggle it so that it does.

I thought that i could catch the send event of the SMSAppointment, create a
new standard Appointmnt item and populate that with the details from the
SMSAppointment then send the standard Appointment and discard it saving the
SMSAppointment. The thing is i cant work out how to access the propertys of
either the safe item of the original item. Any suggestions? The code below
doesnt work

Thanks
Ben

My Code

Private Sub objAppointment_Send(Cancel As Boolean)
   Debug.Print "Send"
   'Cancel = True
   'objAppointment_Write (Cancel)
   On Error GoTo err_temp_appoint
   'Create a new Appointment Item to send
   Dim SafeItem As Redemption.SafeAppointmentItem
   Set SafeItem = CreateObject("TBOLcom.SafeAppointmentItem")

   'set the safeitem's item to a new olAppointmentItem
   SafeItem.Item = oOL.CreateItem(olAppointmentItem)
   Set SafeItem.OptionalAttendees = objAppointment.OptionalAttendees
   Set SafeItem.RequiredAttendees = objAppointment.RequiredAttendees
   Set SafeItem.Recipients = objAppointment.Recipients
   Set SafeItem.Body = objAppointment.Body
   Set SafeItem.Organizer = objAppointment.Organizer
   Set SafeItem.Resources = objAppointment.Resources
   Set SafeItem.NetMeetingOrganizerAlias =
objAppointment.NetMeetingOrganizerAlias

   SafeItem.Send

   ' TODO: cancel send and save objAppointment

   Set SafeItem = Nothing
Exit Sub
err_temp_appoint:
   Debug.Print Err.Description
   Resume Next
End Sub

Dimtry's Code
       Dim sItem As Redemption.SafeAppointmentItem
       Set sItem = CreateObject("TBOLcom.SafeAppointmentItem")

       sItem.Item = objAppointment
       Dim pr_form_storage

       pr_form_storage =
sItem.GetIDsFromNames("{00062008-0000-0000-C000-000000000046}", &H850F) 'or
&H0102 'PT_BINARY
       'pr_form_storage =
sItem.GetIDsFromNames("{00063033-0000-0000-C000-000000000046}", &H102)
                                                   '{00063033-0000-0000-C000-000000000046}
       sItem.Fields(pr_form_storage) = Nothing
       'sItem.Fields(pr_form_storage) = Nothing
Ben Crinion - 28 Apr 2005 18:20 GMT
Ok the code was very naive and I have revised the code so that it will set
many of the properties but now I realise that there are so many problems
with trying to copy the appointment item. Is there a definitive list of all
the properties that I would have to set in the new SafeAppointmentItem so
that it would duplicate the original item?
Or how can i set the tab to nothing in the SMSAppointment. i have looked and
looked at the form using outlook spy but im totally lost. going in circles
with different objects and never getting close to the property i need to
remove.

Ben

> Hi
>
[quoted text clipped - 65 lines]
>        sItem.Fields(pr_form_storage) = Nothing
>        'sItem.Fields(pr_form_storage) = Nothing
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.