L
Lee
I have a template add-in which I need to save with a
username. The template automatically counts what templates
users access.
The code I have is:
'<----------------------Start of Module Code---------------
------------->
Option Explicit
Public gccTemplateUsageCounter As clsCounter
Public Sub AutoExec()
Const cCounterFileFullPath As String
= "M:\TECHNOLOGY\TemplateUsage\CountUsage\count_usage.cnt"
' Instantiate class to perform template usage counting
Set gccTemplateUsageCounter = New clsCounter
' Hook up event handler to that we can catch application
level events
Set gccTemplateUsageCounter.appWord = Word.Application
' Log the existing counter file (if any)
gccTemplateUsageCounter.Initialise cCounterFileFullPath
End Sub
(There is a lot of class modules code with this as well -
let me know if you need to view that).
The Line:
Const cCounterFileFullPath As String
= "M:\TECHNOLOGY\TemplateUsage\CountUsage\count_usage.cnt"
is where I need to put the username, e.g.
\CountUsage\username_count_usage.cnt
Any ideas? Do you need to see the full code? I am
running Word 2002. Thanks in advance.
username. The template automatically counts what templates
users access.
The code I have is:
'<----------------------Start of Module Code---------------
------------->
Option Explicit
Public gccTemplateUsageCounter As clsCounter
Public Sub AutoExec()
Const cCounterFileFullPath As String
= "M:\TECHNOLOGY\TemplateUsage\CountUsage\count_usage.cnt"
' Instantiate class to perform template usage counting
Set gccTemplateUsageCounter = New clsCounter
' Hook up event handler to that we can catch application
level events
Set gccTemplateUsageCounter.appWord = Word.Application
' Log the existing counter file (if any)
gccTemplateUsageCounter.Initialise cCounterFileFullPath
End Sub
(There is a lot of class modules code with this as well -
let me know if you need to view that).
The Line:
Const cCounterFileFullPath As String
= "M:\TECHNOLOGY\TemplateUsage\CountUsage\count_usage.cnt"
is where I need to put the username, e.g.
\CountUsage\username_count_usage.cnt
Any ideas? Do you need to see the full code? I am
running Word 2002. Thanks in advance.