A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Exchange 2003 wrecks my code?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 9th 06, 06:48 PM posted to microsoft.public.outlook.program_forms
[email protected]
external usenet poster
 
Posts: 9
Default Exchange 2003 wrecks my code?

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  
Old November 30th 06, 05:34 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Exchange 2003 wrecks my code?

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
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 09:01 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.