View Single Post
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
paul paul is offline
external usenet poster
 
Posts: 249
Default how many times a document is viewed

Thanks - this looks like it will do what i need.

Paul

"Jay Freedman" wrote:

On Thu, 19 Nov 2009 16:36:01 -0800, Paul
wrote:

Is it possible find out how many times a word document has been opened ? or
is anyone able to advise how to set this up using VBA - maybe to record it in
an external txt or xls file.

Paul


You could adapt the method shown in
http://www.word.mvps.org/FAQs/MacrosVBA/NumberDocs.htm -- just change
the macro name from AutoNew to AutoOpen, and eliminate the two lines
of code

ActiveDocument.Bookmarks("Order").Range.InsertBefo re Format(Order,
"00#")
ActiveDocument.SaveAs FileName:="path" & Format(Order, "00#")

and don't bother putting the bookmark into the document.

The drawback is that not everyone allows macros to run on their
machine, and copies of the document may not be connected to the
original template. So the count could easily be too small and you'd
have no way to know.


--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
.