Document version management [duplicate] - sharepoint

I'm trying to work out a way to display the contents of the version column from SharePoint (i.e. the value that changes every time a file is checked in) as a field (or something similar) inside of a Word document.
Ideally, I'd like to know how to configure SharePoint so I could click something like "Insert > Quick Parts > Document Property > Version", and it would include the version in the document. The goal is to make it easier for someone to correlate a printed version of a document with the version history of SharePoint.
I have been able to add editable text columns to the Document content-type and have them show up as document property quick parts. I've also been able to add a calculated column which gets the version as a text string... however this calculated column isn't showing up in Word as a document property. (Perhaps I'm missing a setting on the calculated column)

This is one way to get the version in your document, it's a bit painful to get it working...
Enable versioning and content types on your document library.
Go into document library settings and select the content types you want the version to appear in.
Select Information management policies settings from the content type menu.
Select define a policy and click .
Click on the 'Enable Label' Check box
Do not Check the other two boxes in the Labels section.
In the Label Format field, enter the metadata fields in the following format:
Version : {Version} \n
Set the label appearance and click on preview.
Click at the bottom of the page.
Go back to the library and create a new document using the content type you have modified.
Save the file as a Word 2007 format.
Select the insert tab
Select Quick Parts from the Ribbon menu and hover over document property
Select Label from the properties list
This should display the metadata defined in your label as a field in your word document. The field will update automatically when you next open the document.
Save.

This requires configuring both SharePoint and your Word document.
TO CONFIGURE SHAREPOINT'S DOCUMENT LIBRARY:
Go to the document library where you plan to store your version-controlled documents.
Click on Settings > Document Library Settings
Click on "Versioning settings" and make sure that you're either having it "create major versions" or "create major and minor (draft) versions".
Click OK.
Click on "Information management policy settings"
If your library can handle multiple content types, you'll see a list of them. Click on "Document". If it can only handle one content type, skip this step.
Select "Define a policy..." and click OK.
Check the "Enable Labels" box, but don't check either of the other two boxes in that section.
Type {Version} into the "Label format" box.
(Optional) You can format the version label.
Click on the "Refresh" button to see a preview of your version label. It will say something like {_UIVersionString}
When you're satisfied with the label's appearance, click OK.
To get back to your document library, click on the document library's name in the breadcrumb trail at the top of the page.
TO CONFIGURE YOUR WORD DOCUMENT:
Either create a new document in the library or upload one.
Open the document and edit it.
Put the cursor wherever you want the version label to appear.
Go to Insert > Quick Parts > Document Property > Label
The version label "{_UIVersionString}" will show up in the document.
Save the document (and choose what the next version should be). You're all set!
If you want to test it, close the document and reopen it. The updated version will automatically appear where you put the version label.
These instructions were based on Erwin's answer.

I followed Rachel's instructions and they worked great. However, capturing this version update in the document does create a problem if you want to do electronic signatures. For instance, if your version is 1.6 and you decide this is the one for people to sign; you'll find that when they sign it, the document will be saved as version 1.7. When you open the document again, the version 1.7 will not match the authorized version of 1.6 and you'll be informed that all the signatures are invalid.

IMPORTANT:
In SP2010 you cannot save as a site template when Labels are enabled within a document library under Information management policy settings. The document library will get corrupted and even if we disable the policy, the save as site template function is still broken. The only option seems to be to permanently delete and rebuild the list.

The RevNum field that I think jaloplo is referring to is not the same as the SharePoint document version number. It updates every time you save the document, but seems to keep its own revision numbering system, correlated to (but independent of) the SharePoint version numbering system.

Try creating a calculated field in a custom content type. The field can be equal to the Version. That will give you the ability to add it as a property in the document. This only works well with Office 2007 docs.
Once a custom content type is created, you create a new document based on the content type.
After creating the document, you can extract the document information panel and save it. It is an info path form, so you can customise it if necessary and upload the customised panel to the content type.

Erwin's answer is spot on, but I wanted to leave this in case someone runs into the same issue I did. If you attempt to set the label for version on the site collection content type rather than at the document library level, you will get the error "The label reference, Version, could not be found." when previewing or saving the Information Policy. Also, you will be unable to save a policy at the document library level if you have previously defined one at the site collection content type level. It must be set to "None" on the site collection content type. Probably should have been obvious to me from the start, but it wasn't, and maybe this will help someone else down the line.

All columns of a document library are document properties for a word document. To take the version of the document you have to show document properties and then select "advanced properties". In thit moment, you'll see the classic document properties window and you can see the "Version" property in the last tab.
So, you can add the value of this property to your document in the place you want, for example, the footer.

Related

Document library properties in sharepoint other than default like Title, Description

Is it possible to add additional properties to a document library in SharePoint using OOTB or Customization?
By default Document library has properties like Title, Description.
I need to add an other custom property in a library level which i can use it for further purpose.
Appreciate your inputs..
Thanks,
Gnanasekhar K
If you want to have metadata for folders/Library, You can look in to "Document Sets"(OOTB)
You can create columns and even run workflows on it.
You can add custom columns to document library. Navigate to document library settings and click on add new column. Or Alternatively click on Create Column option in the ribbon.
Choose the column display name, data type and other properties like default values, choice options etc. (depending upon the type of column you intend to create) and click on OK button.
You would be able to see the column in the default list view. You will also be able to capture the column's value for each document (after you upload it) via Edit properties form.
Refer [this][1] article for more details
For storing metadata for document library, you can use property bags. Property bags can be associated with
farm
web application
site collection
site
list/library
You can do this using
Powershell script
CSOM code
JSOM code

Change the name when Customizing CRM 2011

I customize the campaign form and i face the some problem
1.How to customize the name "GENERAL".i need the name instead of GENERAL .Where to change?or which property should i change?
2.cant delete Lock symbol fields if we try , its saying "It is allowed only for business units".How to unlock and How to delete this?
As Guido suggests, double you can edit the name of the tab by opening up the form in the form editor, double clicking on the tab, and changing the label.
As far as the locked field, you'll have to mark the field as not required, in the entity customization, publish your changes, then you can delete the field from the form.
The label for any tab can be changed by the form editor, if you want a dynamic value you can set using supported customization as this example:
var firstTab = Xrm.Page.ui.tabs.get(0);
firstTab.setLabel("new tab name");
If a field is locked, it means that is business required (in your case is the name of the campaign that must be filled), you can always hide the field and pre-fill the value using javascript code inside onload, onchange or onsave events.
Perhaps someone else can suggest a better (i.e. supported) solution but until then - why not find out the id of those elements and edit them directly from JS in onload? Let me repeat, though, that such an operation is unsupported.

Document Library Crawl

I set up a new scope and passed in the URL for a specific document libary that I created that hold 2 word documents.
For some reason when I start a full crawl, it does not see the 2 word documents.
The word documents have meta data and I've created Managed Properties that map the crawled properties.
I am trying to utilize the Advanced Search webpart to be able to search from this scope. When I enter a search term such as the filename of the word document, no results are returned.
Any ideas?
You need to enable the document library to be searchable. Enable it through the document libraries properties.
Edit
See Harnessing Properties in SharePoint Search
To get to the Document Library Advanced Settings page, from within a given library, select the Document Library Settings menu item from the Settings dropdown, and then select the Advanced settings hyperlink under the General Settings header. Somewhere in there, you should see something like the following image. Make sure that the radio button is set to Yes. Source
(source: bamboosolutions.com)
What account is the crawler running as? Maybe that account doesn't have read permission on the list, so it can't index it.
Can you find information from the same documents in other document libraries, when using the default search scope?
Can you find information from this document library using the default search scope?
Are you trying to create a custom search results page, or just scope?
One thing to try is to check the search crawl log to see if there were any errors when it was searching the library.

How to save a word template for a content type without filling in required fields

I have a content type that has required fields. I have associated Word document with the content type as a template. I now want to edit the Word template, but word won't allow me to save the template without filling in the required fields. However, if I fill in the required fields and save the document, then those fields get populated with my values when you create a new document. This isn't good because I want the fields to be blank when a new document is created - I want the users to be forced to fill in those values.
I can update the templace by updating the colums and making them optional, editing the word template, saving the template & then changing the columns back to required. This is a PITA - there's got to be a better way, does anyone know what it is?
I've been using this work around: When I edit the template (ie go to the content type settings --> Advanced settings --> Edit Template), I make my changes and save the file locally. Then, on the same page that I clicked the "Edit Template" link, I upload the copy that I saved locally. Saving it locally avoids the validation that happens when you try to save it back to SharePoint. But the validation still gets applied to any new documents of that content type. So no need to toggle the settings off & on! :)
Have you tried saving the document as a normal document content type, making the changes, saving it, then moving back over the top of where the old version of the template was?
The only solution I've found is to modify document templates on library level. Just upload a new document template for the required content type.
However, this will not work if you'd like to re-use one and same content type across different document libraries.

SharePoint custom content feature with Word Quick Parts and Document Information Panel

I am creating a custom content type feature for MOSS that will also include a Word 2007 document as the document template. The same Word document will also have a Document Information Panel (DIP) and Quick Parts for all the fields in the content type.
The problem is that when my feature is deployed the Word document's Quick Parts no longer seem bound to the content type's columns in the Document Library. For example, if you:
Type a value into the Quick Part
Save the Word document to the document library
Look at the documents properties;
The value just typed is not listed. However if you use the DIP to specify the value (instead of the quick part) and then save it, it does get saved as metadata.
The "Document Information Panel Settings" screen for my content type is acting as if there is no InfoPath template. Sure enough if I re-upload (or create a new) InfoPath template, then the above problem goes away.
How do I get this to work in my feature without having to do the manual step described above?
It may be possible to define a custom template for the DIP and deploy that to the site, setting the content type to link to that template.
I found a solution in a blog, but you have to use InfoPath... Here is the link:
Using SharePoint Metadata in Word Documents – The Lookup Column
http://vspug.com/maartene/2009/03/13/using-sharepoint-metadata-in-word-documents-the-lookup-column-issue/

Resources