Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook - Using Forms (http://www.outlookbanter.com/outlook-using-forms/)
-   -   Code to set an auto follow up flag (http://www.outlookbanter.com/outlook-using-forms/12347-code-set-auto-follow-up.html)

A Don April 21st 06 11:55 AM

Code to set an auto follow up flag
 
Hi there,

I have been asked to develop a custom form (Outlook 2003) which requires a
follow up flag to be generated 1 hour after it is received by the recipient.

I have managed to trigger the flag automtically using the following code in
the
Send Mail function however this only flags up as soon as the mail is opened.

Function Item_Send()

'validate the fields before sending
Item_Send = False
if DoValidation Then

'set the importance & flag
Importance = 2
FlagStatus = 2
FlagRequest = "Follow Up " & Item.Subject
FlagDueBy = Now()
Item_Send = True
Else
Exit Function
End If
End Function

Reading other forums it is apparent that this is possible using the
DateAdd() function, however I'm not too sure how this works.

Does anyone out there have any ideas ?



A Don April 21st 06 12:19 PM

Code to set an auto follow up flag
 


"A Don" wrote:

Hi there,

I have been asked to develop a custom form (Outlook 2003) which requires a
follow up flag to be generated 1 hour after it is received by the recipient.

I have managed to trigger the flag automtically using the following code in
the
Send Mail function however this only flags up as soon as the mail is opened.

Function Item_Send()

'validate the fields before sending
Item_Send = False
if DoValidation Then

'set the importance & flag
Importance = 2
FlagStatus = 2
FlagRequest = "Follow Up " & Item.Subject
FlagDueBy = Now()
Item_Send = True
Else
Exit Function
End If
End Function

Reading other forums it is apparent that this is possible using the
DateAdd() function, however I'm not too sure how this works.

Does anyone out there have any ideas ?





I think I've cracked it - I've changed 1 line of code

FlagDueBy = DateAdd("n",60, Now)




All times are GMT +1. The time now is 09:03 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-2006 OutlookBanter.com