Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2006

Tip: Looking for answers? Try searching our database.

Recording in text file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark - 26 Nov 2006 09:41 GMT
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

Signature

Mark

Helmut Weber - 26 Nov 2006 10:01 GMT
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

Signature

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

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

Mark - 26 Nov 2006 17:16 GMT
Brilliant, many thanks

Signature

Mark

> Hi Mark,
>
[quoted text clipped - 6 lines]
> Close #1
> End Sub

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.