Can I link version history number in a document ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I use sharepoint to control my documents at work and I use version history,
to track changes. Is it possible to show version history number in a
document, so people can see the version history number, when they print out
the document ?
 
Hi Linda,

You can use a DOCPROPERTY "RevisionNumber" field to get a count of each time
the document has been saved. If that's what you want, you can create one via
Insert|Field, or by pressing Ctrl-F9 to create a pair of field braces (ie
'{ }') and typing 'DOCPROPERTY "RevisionNumber"' between them so that you end
up with '{DOCPROPERTY "RevisionNumber"}'.

Alternatively, if you're saving using Word's 'Version' feature, you could use
add a macro to the document as per the example at:
http://support.microsoft.com/kb/212618/en-us
to create a custom 'Version' document property and call it with a field coded
as '{DOCPROPERTY "Version"}'. To do this you'd change the sub named 'Sub
SetCustomPropertyName()' so that the line:
SetProp "MyCustomPropertyName", "MyCustomValue", _
becomes:
SetProp "Version", ThisDocument.Versions.Count, _

Cheers

--
macropod
[MVP - Microsoft Word]


| I use sharepoint to control my documents at work and I use version history,
| to track changes. Is it possible to show version history number in a
| document, so people can see the version history number, when they print out
| the document ?
 
I am also very interested in embedding the WSS Version field in the Word
document for the same reason.

The responses below don't return the WSS version number which is the one I
want as it correlates with the version in WSS. Anything else is going to
cause the users confusion.

Does anyone know how to get at the WSS fields?

Cheers

Richard
 
Hi Richard,

I'm not familiar with the WSS Versions, having never used SharePoint, but there's an article you might find useful on accessing the
SharePoint DocumentLibraryVersion (which is what I think you want) at:
http://msdn2.microsoft.com/en-us/library/aa171357(office.11).aspx

When you run that code, you should test whether SharePoint is present. For example:

If ActiveDocument.SharedWorkspace.Connected then
'SharePoint is present
Else
'SharePoint is not present
End If

Cheers

--
macropod
[MVP - Microsoft Word]


| I am also very interested in embedding the WSS Version field in the Word
| document for the same reason.
|
| The responses below don't return the WSS version number which is the one I
| want as it correlates with the version in WSS. Anything else is going to
| cause the users confusion.
|
| Does anyone know how to get at the WSS fields?
|
| Cheers
|
| Richard
|
| > Hi Linda,
| >
| > You can use a DOCPROPERTY "RevisionNumber" field to get a count of each time
| > the document has been saved. If that's what you want, you can create one via
| > Insert|Field, or by pressing Ctrl-F9 to create a pair of field braces (ie
| > '{ }') and typing 'DOCPROPERTY "RevisionNumber"' between them so that you end
| > up with '{DOCPROPERTY "RevisionNumber"}'.
| >
| > Alternatively, if you're saving using Word's 'Version' feature, you could use
| > add a macro to the document as per the example at:
| > http://support.microsoft.com/kb/212618/en-us
| > to create a custom 'Version' document property and call it with a field coded
| > as '{DOCPROPERTY "Version"}'. To do this you'd change the sub named 'Sub
| > SetCustomPropertyName()' so that the line:
| > SetProp "MyCustomPropertyName", "MyCustomValue", _
| > becomes:
| > SetProp "Version", ThisDocument.Versions.Count, _
| >
| > Cheers
| >
| > --
| > macropod
| > [MVP - Microsoft Word]
 
Hi Linda,
Did you get any joy with this?
I'm after the exact same solution - the SharePoint version of my document as
a field within the document's text.
RevisionNumber is not the same thing. I've searched but I've not been able
to find a solution. Surely it must be simple.
Best of luck
Hugh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top