Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Contacts / February 2004

Tip: Looking for answers? Try searching our database.

Update custom "date modified" field on SAVE?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
AmyG - 03 Feb 2004 21:33 GMT
I've designed a custom form in Outlook 2002 which has a
Date created and Date modified field.  Is there a way
design the form so the fields are automatically updated to
the current date when it is created, and then subsequently
each time it is saved?   I found a Visual Basic macro that
would update the field if I ran it after each time I
modified something, but since this is for an office-wide
database and I will not be the only one adding/editing
entries, it would be great if I could just program it into
the form.

Thanks!

Amy
Sue Mosher [MVP] - 03 Feb 2004 22:10 GMT
Try:

Function Item_Write()
   If Item.EntryID= 0 then
       Item.UserProperties("Date Created") = Now()
   End If
   Item.UserProperties("Date Modified") = Now()
End Function

FYI, there is a newsgroup specifically for Outlook forms issues "down the
hall" at microsoft.public.outlook.program_forms

Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> I've designed a custom form in Outlook 2002 which has a
> Date created and Date modified field.  Is there a way
[quoted text clipped - 10 lines]
>
> Amy
- 03 Feb 2004 22:36 GMT
Thanks.  However, I hate to profess my ignorance, but I'm
unsure how to use this code - I'm pretty new to this type
of programming. Can you elaborate?

I'll also check with the programming newsgroup.

Thanks
>-----Original Message-----
>Try:
[quoted text clipped - 25 lines]
>
>.
Sue Mosher [MVP] - 03 Feb 2004 22:54 GMT
With the form in design mode, click the View Code button and copy the code
into that window. You must then publish the form and use the published
version to create new items. See http://www.slipstick.com/dev/forms.htm for
more forms basics.
Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Thanks.  However, I hate to profess my ignorance, but I'm
> unsure how to use this code - I'm pretty new to this type
> of programming. Can you elaborate?

> >-----Original Message-----
> >Try:
[quoted text clipped - 5 lines]
> >    Item.UserProperties("Date Modified") = Now()
> >End Function

> >"AmyG" <anonymous@discussions.microsoft.com> wrote in
> message
[quoted text clipped - 19 lines]
> >
> >.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.