time date stamp

B

BorisS

Any key combination that puts a time date stamp in the notes field? I have a
task sheet view, and have notes on the bottom. Very convenient, but if I
could quickly get a tds right before I enter a note, would be great.

If someone has a macro they can provide, that would be fine. I am not
necessarily looking for a built-in function.

Thx.
 
J

John

BorisS said:
Any key combination that puts a time date stamp in the notes field? I have a
task sheet view, and have notes on the bottom. Very convenient, but if I
could quickly get a tds right before I enter a note, would be great.

If someone has a macro they can provide, that would be fine. I am not
necessarily looking for a built-in function.

Thx.

Boris,
This VBA code should do what I think you are asking:

sub NoteDateStamp()
NewDate = FormatDateTime(ActiveProject.CurrentDate, vbShortDate) & " "
For Each t In ActiveProject.Tasks
If Not t Is Nothing Then
If t.Notes <> "" Then
t.Notes = NewDate & Mid(t.Notes, InStr(1, t.Notes, " "))
Else
t.Notes = NewDate
End If
End If
Next t
End Sub

This code will automatically add a date if none is present or update the
date if the note is already date stamped. Obviously variations on the
code to suit you specific needs.

Hope this helps.
John
Project MVP
 
B

BorisS

John, thanks, but I am not sure I was clear in the first message...what I
want is not have all tdstamps updated. Rather, when I click into a note to
make a comment (in addition to all others that are there), I want a quick
keystroke (which I'll assign to a macro) which literally just types in the
current date (preferably in "Day, dd-mm-yy" format), and then the time
(preferably in hh:mm format).

If that is what this is going to do, I'll test it. But I am afraid it looks
like it might go through all of my tasks once run.
 
B

BorisS

I think literally what I need is as simple as a procedure that:

1) sets some string to be equal to the current date/time (day, dd-mm-yy;
hh:mm -)
2) types that string into the place in the note where I have the cursor

I just don't know how to do that. So if that is possible, and you can tell
me the code for it, I think I'm set.

Thx.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top