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]