Recording in text file

M

Mark

I am using Word 97 still!

Can anyone assist me with some code which would sit in a template and
records in a text file when a document is opened, the document name ,
time/date and the user logged on at the time?

Thanks in advance
 
H

Helmut Weber

Hi Mark,

like this:

Sub autoopen()
Open "c:\test\log.txt" For Append As #1
Print #1, ActiveDocument.FullName; _
Chr(9); Date; Chr(9); Time; Chr(9); Environ$("Username")
Close #1
End Sub

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 

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