Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, PA
    Posts
    855
    Thanks
    140
    Thanked 10 Times in 9 Posts

    Time Stamp Enhancer

    This thing may already exist somewhere, for all I know. There's definitely a need for it, for example when people are using Word to keep a log of some kind. I can use it on some progress notes I'm keeping in Word, but creating it is above my skill level. I'll explain it here so people can offer suggestions, solutions, or whatever.

    Many places that offer time-sensitive information mark that information with notes such as "3 minutes ago", or "22 hours ago", or "3 months ago", etc. The notes are updated periodically, and their format changes as time goes on, such as changing the measurements from minutes to hours to days to weeks or months. An example of this is a newspaper site HERE. (It may be behind a pay wall for some people.)

    It would be useful if there were some sort of macro or add-in for Word that could do a similar thing. My vision for it is this:

    There would be a hotkey that inserted into a document the present date or date and time in a format preselected by the user, e.g. 02/14/2016 4:30 PM. Call this the timestamp. It probably wouldn't be too hard to implement. Printing it or part of it might even be optional. (Think the "Hidden" font effect.)

    There would be inserted, after the optionally-printed timestamp, an indication of how much time has passed since the timestamp. ("30 seconds ago", or "2 hours ago", or "7 months ago", etc.). Call this the history stamp.

    There would need to be some mechanism for updating the history stamp. Possibly it could be updated every time the document is opened, or saved, or after a passage of time, or whatever.

    The developer would have to give some thought to the intervals the history stamp would cover. Something during the past day would be handled differently from something during the past week, and still differently from something during the past month or several months. I don't know how they break this down on the news sites, but changing the format after an hour, a day, a week or a month would probably do it.

    The "sticky" at the top of this forum section has an interesting tutorial on time/date calculations. It might be useful in developing this application. See it HERE.

    Maybe someone knows where this "enhancer" already exists, or can take some steps to develop it. Let us know.
    Last edited by Lou Sander; 2016-02-15 at 08:50. Reason: Add example: log keeping
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    You could use Track Changes.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #3
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, PA
    Posts
    855
    Thanks
    140
    Thanked 10 Times in 9 Posts
    I don't see anything in Track Changes that has to do with time or elapsed time since an edit. Am I missing something?
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Track Changes records the date & time an edit was made (plus who made it). It's a simple matter to take the edit date & time and calculate the elapsed time since then.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  5. #5
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, PA
    Posts
    855
    Thanks
    140
    Thanked 10 Times in 9 Posts
    I don't see anything about time in the Tracking area of my ribbon, or in any of the menus that drop down there. Time is not mentioned in the Track Changes help screen.

    Maybe there's some system option that I haven't set, or maybe the U.S. version of Word differs somehow from the Australian version.

    Oh, BTW, I'm using Word 2010. Maybe that's the problem.
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

  6. #6
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    I, too use Word 2010, and there's no difference between US & Aus versions - they're identical except for the choice of spelling dictionary.

    Have you actually looked at a tracked change by letting the mouse hover over it, to see how it's recorded?
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  7. The Following User Says Thank You to macropod For This Useful Post:

    Lou Sander (2016-02-15)

  8. #7
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, PA
    Posts
    855
    Thanks
    140
    Thanked 10 Times in 9 Posts
    Aha! Now I see it. I'm not lazy, just uninformed.

    I had looked at and experimented with many tracked changes, but I had no idea that hovering the mouse could show the date. None of my references mentioned it (F1 help and Word 2010 Inside Out), at least as far as I could see.

    Now I see that the mouse thing works. It only seems to do so when I select "Final: Show Markup". There are some drawbacks:

    1. The added text is in red and underlined, and there is a vertical line in the left margin. Maybe this can be overcome by changing some settings.
    2. More importantly, how can one get access to this time and date information to display it on the document and to use it for calculations?

    I'm thinking it might be easier just to use a macro to insert a time stamp, and to start the history stamp process.
    Last edited by Lou Sander; 2016-02-15 at 08:51. Reason: Clarify
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

  9. #8
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, PA
    Posts
    855
    Thanks
    140
    Thanked 10 Times in 9 Posts
    macropod - Now I see that you are the author of the "sticky" about date arithmetic. Good Work! I'm just a dabbler in these things, but it seems as though your "Calculate the # Days Difference Between Two Dates" tip would go a long way toward getting a working history stamp.

    It maybe shouldn't use bookmarks, since there could be hundreds of them (or more) in a lengthy log. If they are used, maybe there's a way to create and number them automatically. I imagine that Word can handle hundreds of bookmarks, but I don't know for sure.

    If possible, it could somehow take StartDate from the date of the original log entry, and EndDate somehow from Today(). It would probably be satisfactory if History Stamp only said "x days ago". Adding weeks or months could be a later refinement, if they are even needed.
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

  10. #9
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Quote Originally Posted by Lou Sander View Post
    There are some drawbacks:

    1. The added text is in red and underlined, and there is a vertical line in the left margin. Maybe this can be overcome by changing some settings.
    2. More importantly, how can one get access to this time and date information to display it on the document and to use it for calculations?
    You can change the way the tracked content is displayed by changing the 'Track Changes' settings.

    A simple macro could be used to retrieve the change date and calculate an elapsed period from that. For example:
    Code:
    Sub Demo()
    Dim SngTm As Single
    SngTm = Now() - Selection.Range.Revisions(1).Date
    MsgBox Int(SngTm) & " " & Format(SngTm - Int(SngTm), "hh:mm:ss")
    End Sub
    calculates the period elapsed between the change and now.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  11. #10
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, PA
    Posts
    855
    Thanks
    140
    Thanked 10 Times in 9 Posts
    This is good stuff, but I don't think it is going in the direction I need.

    First, I want to initiate a time stamp by a specific action on my part, not by merely changing the document. I might make many changes to the log entry, either before or after the time stamp. I need to be in control of when the time is stamped.

    Second, I'm very much behind you in the ability to see how a macro works and how to bend it to my needs. My requirements are pretty precise. My ability to implement them is only moderate at best. Though I have a working knowledge of macros and VBA, it is that of a beginner, not that of an experienced code writer.

    Third, on the matter of modifying the display of the tracked content, it seems as though those modifications would apply to all documents, not just to the one at hand. I want those special mods to apply only to the documents I want them to apply to; for the others, I want to have the defaults.

    I'm thinking that this whole thing might be best done in Excel, where I could set up a column to receive the time stamp, another to display the history stamp, and a third, much wider one to hold the log entries.
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

  12. #11
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    OK, it wasn't apparent you'd need the time stamp at some other time than the log entry - although even that could be achieved by messing around with Track Changes.

    The macro I posted was just for demonstration purposes. It gives a simple report of how much time has elapsed since selected revision (tracked change) was made. You could run such a macro via a keyboard shortcut.

    The Track Changes setting only applies to the document you apply it to; not to any other.

    Depending on what your needs are, perhaps a Word table would do - one column for the text and another for the time stamp. Again, a fairly simple macro you could run via a keyboard shortcut could be written to insert the current date & time in, say, column 2 of the current row.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  13. #12
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Quote Originally Posted by MartinM View Post
    Unless I am missing something, or didn't read your original post carefully enough, this should be easy.

    Insert a field with the date. When you want to update it, highlight the field and press F9.

    The field can be a date or a time.

    That's it.
    The fundamental flaw in that approach is that merely opening the document the next day will update the field...
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  14. #13
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, PA
    Posts
    855
    Thanks
    140
    Thanked 10 Times in 9 Posts
    The Track Changes setting only applies to the document you apply it to; not to any other.
    Perhaps not always. I changed the markup setting for Insertions to italic, and that formatting seems to "stick" when I open another document.
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

  15. #14
    5 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, PA
    Posts
    855
    Thanks
    140
    Thanked 10 Times in 9 Posts
    Here's a macro that inserts a time stamp. I've assigned it to keyboard shortcut CTRL+T. It inserts the date and time in plain text, so there is no question of it updating as a field:

    Code:
    Sub TimeStamp()
    '
    ' Inserts a Time Stamp
    ' Created by LFS on 2/16/2016
    '
        Selection.InsertDateTime DateTimeFormat:="MM/dd/yy hh:mm", _
            InsertAsField:=False, DateLanguage:=wdEnglishUS, CalendarType:= _
            wdCalendarWestern, InsertAsFullWidth:=False
        Selection.TypeText Text:="  "
    End Sub
    Now the bigger challenge: Getting the history stamp which tells how much time has passed since the time specified in the time stamp.
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

  16. #15
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Quote Originally Posted by Lou Sander View Post
    I changed the markup setting for Insertions to italic, and that formatting seems to "stick" when I open another document.
    Yes, the Track Changes format is 'sticky', but not the Track Changes setting (i.e. on/off).
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •