Custom Contact form not working in added mailboxes

  • Thread starter Thread starter KFM
  • Start date Start date
K

KFM

I've created a custom form for new contacts created in Outlook 2003.

The DateTime button (named CommandButton1), inserts a carriage return, a
datestamp, and then another carriage return after the end of the text in the
body of contact.

The VB code for this is
Code:
Sub StampDate()
Item.Body = Item.Body & vbCrLf & Now()& vbCrLf
End Sub

Sub CommandButton1_Click()
Call  StampDate()
End Sub

I've associated this with my contact forms in outlook, and it works just
fine when creating a new contact.

However, I've added another mailbox to the account I use in Outlook. I've
associated the same form with the contacts to this account, yet when I click
to DateTime button, nothing happens. I also tried clearing the custom forms
cache.

Does Item.Body not refer to the current object when I'm not using my primary
contact form? What is going on?
 
Thank you so much! You may consider yourself a hero.
Sue Mosher said:
Extra steps are involved to get custom forms to run script on items in other
mailboxes. See http://outlookcode.com/article.aspx?id=67
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54




KFM said:
I've created a custom form for new contacts created in Outlook 2003.

The DateTime button (named CommandButton1), inserts a carriage return, a
datestamp, and then another carriage return after the end of the text in the
body of contact.

The VB code for this is
Code:
Sub StampDate()
Item.Body = Item.Body & vbCrLf & Now()& vbCrLf
End Sub

Sub CommandButton1_Click()
Call  StampDate()
End Sub

I've associated this with my contact forms in outlook, and it works just
fine when creating a new contact.

However, I've added another mailbox to the account I use in Outlook. I've
associated the same form with the contacts to this account, yet when I click
to DateTime button, nothing happens. I also tried clearing the custom forms
cache.

Does Item.Body not refer to the current object when I'm not using my primary
contact form? What is going on?
 
Back
Top