![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
I had to revisit some code I had written awhile ago - the code takes a
regular contact, creates a new custom forms based contact, copies the relevant data, and then saves the updated form. This worked fine previously when we were on Exchange 5.5. I'm using the exact same code, but now it throws up 'Object required: objOutlook.ActiveInspector' at line 42. I used a messagebox to determine the point where it's failing and it's when it goes to save it. However, despite the error message everything appears to still work fine. So a) why am I getting this error now that we're running Exchange 2003 and b) how can I fix it? J. Here's the relevant code: Set objDestFolder = objNS.Folders("Public Folders").Folders("All Public Folders").Folders("Sales Contacts") Set objDestItem = objDestFolder.Items For Each Item In objSrcItem 'a subfolder of the Contacts folder If Item.MessageClass = "IPM.Contact" Then Set FormItem = objDestItem.Add("IPM.Contact.Contact Form") FormItem.FullName = Item.FullName FormItem.JobTitle = Item.JobTitle FormItem.Email1Address = Item.Email1Address FormItem.CompanyName = Item.CompanyName FormItem.BusinessTelephoneNumber = Item.BusinessTelephoneNumber FormItem.BusinessFaxNumber = Item.BusinessFaxNumber FormItem.BusinessAddress = Item.BusinessAddress FormItem.MobileTelephoneNumber = Item.MobileTelephoneNumber FormItem.WebPage = Item.WebPage FormItem.BillingInformation = "Converted" FormItem.Save ' This is where I get the error message when I try and save it FormItem.Close (1) End If Next Item |
#2
|
|||
|
|||
![]()
I don't see any objOutlook.ActiveInspector expression in the code you posted. Which is line 42?
This statement would definitely be problematic in Outlook form code: For Each Item In objSrcItem because Item is already used as an intrinsic object. Use a different variable name in your For Each block. Is the public folder set to accept only forms of a particular message class? -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx wrote in message ups.com... I had to revisit some code I had written awhile ago - the code takes a regular contact, creates a new custom forms based contact, copies the relevant data, and then saves the updated form. This worked fine previously when we were on Exchange 5.5. I'm using the exact same code, but now it throws up 'Object required: objOutlook.ActiveInspector' at line 42. I used a messagebox to determine the point where it's failing and it's when it goes to save it. However, despite the error message everything appears to still work fine. So a) why am I getting this error now that we're running Exchange 2003 and b) how can I fix it? J. Here's the relevant code: Set objDestFolder = objNS.Folders("Public Folders").Folders("All Public Folders").Folders("Sales Contacts") Set objDestItem = objDestFolder.Items For Each Item In objSrcItem 'a subfolder of the Contacts folder If Item.MessageClass = "IPM.Contact" Then Set FormItem = objDestItem.Add("IPM.Contact.Contact Form") FormItem.FullName = Item.FullName FormItem.JobTitle = Item.JobTitle FormItem.Email1Address = Item.Email1Address FormItem.CompanyName = Item.CompanyName FormItem.BusinessTelephoneNumber = Item.BusinessTelephoneNumber FormItem.BusinessFaxNumber = Item.BusinessFaxNumber FormItem.BusinessAddress = Item.BusinessAddress FormItem.MobileTelephoneNumber = Item.MobileTelephoneNumber FormItem.WebPage = Item.WebPage FormItem.BillingInformation = "Converted" FormItem.Save ' This is where I get the error message when I try and save it FormItem.Close (1) End If Next Item |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to insert a + sign before country code in Office 2003 | Biz Traveler | Outlook - Using Contacts | 1 | October 20th 06 06:07 PM |
rules and alerts limits with outlook 2003 & Exchange 2003 | Jeje | Outlook - General Queries | 2 | June 9th 06 02:44 AM |
For Outlook 2003 contacts, how do I set the default area code? | attitude55 | Outlook - Using Contacts | 2 | May 25th 06 12:50 AM |
VBA code not starting on some Outlook 2003 clients, does on others. | [email protected] | Outlook and VBA | 3 | May 17th 06 06:21 PM |
CODE working in 2003 but not in 2002 | gobjob | Outlook and VBA | 3 | February 14th 06 06:31 PM |