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"
 
Top