B
Brian
Good morning all,
I have got myself in a thought loop. What I am trying to achieve, is create
a field reference to a macro. The macro will identify the last 3 characters
in the file name, prior to the .doc extention.
The file names including the path are not consistent in length.
The idea is when the document is saved with a new version number, the
document will be updated with the new version number in the all footers and
other reference points within the document i.e., Version {field macro return}.
I have been adapting the following to try to achieve this with no luck. Any
guidance would be gratefully received.
Sub insertVno()
Dim fname As String
Dim strTemp() As String
With ActiveDocument
fname = .Name
strTemp = Split(fname, ".") & strTemp
sstrTemp = strTemp
pInputStr() = Split(".Name, "\")
fname = sstrTemp(3) & "." & strTemp(4)
.Variables("varVERFilename").Value = fname
.PrintPreview
.ClosePrintPreview
End With
' End Sub
Thanks
I have got myself in a thought loop. What I am trying to achieve, is create
a field reference to a macro. The macro will identify the last 3 characters
in the file name, prior to the .doc extention.
The file names including the path are not consistent in length.
The idea is when the document is saved with a new version number, the
document will be updated with the new version number in the all footers and
other reference points within the document i.e., Version {field macro return}.
I have been adapting the following to try to achieve this with no luck. Any
guidance would be gratefully received.
Sub insertVno()
Dim fname As String
Dim strTemp() As String
With ActiveDocument
fname = .Name
strTemp = Split(fname, ".") & strTemp
sstrTemp = strTemp
pInputStr() = Split(".Name, "\")
fname = sstrTemp(3) & "." & strTemp(4)
.Variables("varVERFilename").Value = fname
.PrintPreview
.ClosePrintPreview
End With
' End Sub
Thanks