L
lee.james
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
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