Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word 2007 Logfile? 6

Status
Not open for further replies.

iolair

IS-IT--Management
Oct 28, 2002
965
US
This has probably been answered before, but I couldn't find it. In Notepad, you can type .LOG at the very top of a textfile and it will automatically insert the date and time whenever you add an entry to the file. It's great for keeping a logfile.

Is there a way to do this in Word? I tried the same trick, .LOG in Word and it does nothing. There is a menu item that lets you insert the date and time, but it's really nice to have it automatically done.

I'd like to do this in Word for formatting reasons and other features that Notepad just doesn't have.

TIA

Iolair MacWalter
Network Engineer
 
You could do it with an autoopen macro easily enough. In the ThisDocument module, just add ..

Code:
[blue]Sub AutoOpen()
Range.InsertParagraphAfter
Range.InsertAfter Now()
Range.InsertParagraphAfter
end sub[/blue]

Enjoy,
Tony

------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

I'm working (slowly) on my own website
 
WOW!
In Notepad, you can type .LOG at the very top of a textfile and it will automatically insert the date and time whenever you add an entry to the file.
I didn't know that. Nice trick!!
Have a pinky for it.

[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
 
Hitting F5 in notepad also creates a time stamp (no .LOG required)


Sam
 
Word and Excel don't have the .LOG option but you can insert date and time with function keys:

Excel Ctrl+Shift+;

Word Alt+Shift+d for Date
Word Alt+Shift+t for Time

Not as good as .LOG but it may be worth something.

Sam
 
To add to shortcut keys:

Excel Ctrl+Shift+; for Date
Excel Ctrl+Shift+: for Time
 
Sorry, it's

Excel Ctrl + = + ; for Date
Excel Ctrl + = + : for Time

Control Equal Semicolon for Date
Control Equal Colon for Time
 
Thanks for all the great tips. I can see that there are several ways to do it.

Iolair MacWalter
Network Engineer
 
AzizKamal,

It's actually MUCH simpler than that.. I was just trying it to see..

<Ctrl>+<;> = Date
<Ctrl>+<Shift>+<;> = Time

Or in other words:

<Ctrl> + <;> = Date
<Ctrl> + <:> = Time

And to think, I went and mapped a custom VBA procedure to do just that (the one for only the date) a few years ago - b/c I couldn't find a keyboard shortcut to do the trick. Pretty neat!
 
Thanks kjv1611.

Yes, you are right. It works even without pressing equal key.

Control Semicolon for Date
Control Colon for Time

is working perfectly in Excel.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top