M
Michael Anderson
I have customised an Outlook Contacts Form with the code...
Sub Item_CustomPropertyChange(ByVal Name)
If Name = "mxzMembershipStartDate" Then
dteDate = Item.UserProperties("mxzMembershipStartDate").Value
dteNextDate = DateAdd("m", 12, dteDate)
Item.UserProperties("mxzMembershipRenewalMonth").Value = dteNextDate
If Item.UserProperties("mxzMembershipStartDate").Value = "" Then
dteNextDate = 12/12/2000
Item.UserProperties("mxzMembershipRenewalMonth").Value = dteNextDate
End If
End If
End Sub
Sub mxzAddressButton_Click()
If Item.UserProperties("Other Address Street").Value = "" Then
Item.UserProperties("Other Address Street").Value =
Item.UserProperties("Business Address Street").Value
End If
If Item.UserProperties("mxzOtherSuburb").Value = "" Then
Item.UserProperties("mxzOtherSuburb").Value =
Item.UserProperties("mxzBusinessSuburb").Value
End If
If Item.UserProperties("Other Address City").Value = "" Then
Item.UserProperties("Other Address City").Value =
Item.UserProperties("Business Address City").Value
End If
If Item.UserProperties("Other Address Postal Code").Value = "" Then
Item.UserProperties("Other Address Postal Code").Value =
Item.UserProperties("Business Address Postal Code").Value
End If
End Sub
I want to give this to someone else. I saved this as a template. When I load
the Template my code does nothing. I guess copying the contents of the form
code to a text file and pasting it on an existing Contact form is one
alternative. I thought templates were better than that!
Sub Item_CustomPropertyChange(ByVal Name)
If Name = "mxzMembershipStartDate" Then
dteDate = Item.UserProperties("mxzMembershipStartDate").Value
dteNextDate = DateAdd("m", 12, dteDate)
Item.UserProperties("mxzMembershipRenewalMonth").Value = dteNextDate
If Item.UserProperties("mxzMembershipStartDate").Value = "" Then
dteNextDate = 12/12/2000
Item.UserProperties("mxzMembershipRenewalMonth").Value = dteNextDate
End If
End If
End Sub
Sub mxzAddressButton_Click()
If Item.UserProperties("Other Address Street").Value = "" Then
Item.UserProperties("Other Address Street").Value =
Item.UserProperties("Business Address Street").Value
End If
If Item.UserProperties("mxzOtherSuburb").Value = "" Then
Item.UserProperties("mxzOtherSuburb").Value =
Item.UserProperties("mxzBusinessSuburb").Value
End If
If Item.UserProperties("Other Address City").Value = "" Then
Item.UserProperties("Other Address City").Value =
Item.UserProperties("Business Address City").Value
End If
If Item.UserProperties("Other Address Postal Code").Value = "" Then
Item.UserProperties("Other Address Postal Code").Value =
Item.UserProperties("Business Address Postal Code").Value
End If
End Sub
I want to give this to someone else. I saved this as a template. When I load
the Template my code does nothing. I guess copying the contents of the form
code to a text file and pasting it on an existing Contact form is one
alternative. I thought templates were better than that!