Adding to the current date

  • Thread starter Thread starter Janet
  • Start date Start date
J

Janet

I have created a template in Outlook 97. One of the
fields is "Sent" another is a user define field
called "Due". I want "Due" to be equal to "Sent plus 2
days but I am having no luck getting this.


Here are some things I have tried.

On the Value tab in properties, I have tried setting the
inital value with "DateAdd(2,"dd ",now())" (also tried the
same using "sent" as the last variable.

I have tried setting the value when the e-mail is sent with
Function Item_Send()
txtDue=Now() + 2
End Function


The purpose of this "Due" field is so that if the receiver
hasn't responded to the inital e-mail within the two days,
they will be prompted. Maybe there is a better way of
doing this?

Sorry, new to trying to work in outlook and not having
much luck. Would appriciate any help you can give me.
 
Your Item_Send event handler is not using the correct syntax for a user-defined field. Try:

Function Item_Send()
Item.UserProperties("Due") =Now() + 2
End Function

What I don't see is how Due is going to prompt the recipient for anything? If you want a prompt, you should be working with the built-in FlagStatus and FlagDueBy fields.

See http://www.slipstick.com/dev/propsyntax.htm
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
Back
Top