Custom Contact form not working in added mailboxes

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?
 
K

KFM

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top