PC Review


Reply
Thread Tools Rate Thread

Copy fields within the same Appointment that has custom form

 
 
New Member
Join Date: Mar 2010
Posts: 1
 
      29th Mar 2010
I have an appointment that has a custom form attached to it called Transportation Form or P.2.

When a user is in custom form or P.2, upon cliking macro shortcut, some data fields will come over to first tab which is a regular appointment with subject, date and etc.

Not sure how to copy between different tabs within the same appointment. I get an error -2147024809?
Error is on Set ctrl = Application.ActiveInspector.........
Any help would be greatly appreciated!

here is my code:

Sub FormtoAppt()
Dim Subject As String
Dim objAppointment As AppointmentItem
Set myFolder = Session.GetDefaultFolder(olFolderCalendar)
Set myItem = myFolder.Items.Add("IPM.Appointment.Formv1")
Dim objAppt As AppointmentItem
Dim ctrl As Object
Dim ctrl2 As Object
On Error GoTo ErrorCode

If Application.ActiveInspector.CurrentItem.Class = olAppointment Then

Set objAppointment = Application.ActiveInspector.CurrentItem
Set ctrl = Application.ActiveInspector.ModifiedFormPages("Transportation Form").Controls("DestinationandAddr")
Set ctrl2 = Application.ActiveInspector.ModifiedFormPages("Appointment").Controls("objAppt.Body")
ctrl2 = ctrl

Else
MsgBox Prompt:="Please open Appointment"
End If

Exit Sub
ErrorCode:
If Err.Number = 91 Then
MsgBox Prompt:="Appointment must be open"
Else
MsgBox Prompt:="Gen Error!"
End If
End Sub
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Form overwriting the default appointment form in outlook 20 Irina Microsoft Outlook Form Programming 1 14th May 2009 07:17 PM
Custom Appointment Form depending on the category of appointment emri Microsoft Outlook Discussion 2 5th Oct 2006 02:53 PM
Custom Appointment Form,problem with fields: Where are do they res =?Utf-8?B?SkJAU0JDIFNhY3JhbWVudG8=?= Microsoft Outlook Form Programming 3 15th Jul 2005 06:14 PM
Creating Reminder Fields in custom appointment jonnytansey2@hotmail.com Microsoft Outlook Form Programming 1 2nd May 2005 04:48 PM
Copy & paste attachments into custom form text fields =?Utf-8?B?TWFyYyBXZWF0aGVyaWxs?= Microsoft Outlook Form Programming 4 27th Feb 2004 09:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:23 AM.