If anybody asks me what is the best function in excel I am drawn between Sumproduct and Data Tables, Both make handling large amounts of data a breeze, the only. Technical articles, content and resources for IT Professionals working in Microsoft technologies. WSS version number in the Word 2. Microsoft Office Share. Point and related. We have now the third version of Team Services and it is called Windows Share. Point Services V3. It is now possible to have a better handling of version controlling means Major and Minor versions in a document library. Why not have this information also in the document and be able to print it out? The property differences: Here we see the standard property window and please refer to the Revision number. This number you could call Version but it is only an internal number which is 8 bit long and not accessible from outside. This means we have to find a different way. We have to use custom properties. If you open an existing word document in a doclib you will see the property Content. Type. Why not put also the version number in a similar property? MICROSOFT ACCESS Questions and Answers pdf free download,MS ACCESS objective type Questions and Answers,multiple choice interview questions,viva,online quiz.
The goal: We start with a new document by a click on New in the doclib. I changed the template. WSSVersion” configured with the first value “0. To see a value of Doc. Property you must insert a “Field” and choose the appropriate property. These fields must also be recalculated to show the right value! The standard is that those fields are recalculated when you print the document. The next deal is how to put the right value at the right time into this property or also called doclib- column? Feature? We will use a new feature comes with WSS V3 and . Net Framework 2. 0 and it is also called feature in WSS. Refer to the path on your server: C: \Program Files\Common Files\Microsoft Shared\web server extensions\1. TEMPLATE\FEATURES and you will see a lot of other folders. At this place we can also install our “Version Feature”. For this sample I am using the folder C: \Program Files\Common Files\Microsoft Shared\web server extensions\1. TEMPLATE\FEATURES\Doc. Version. 1. We need a feature. Doc. Version: < ? ISO- 8. 85. 9- 1" ?> < Feature. Scope="Web" Title="Get the version into the document" Description="Have also the Share. Point version number of a document into the document." Id="0. Element. Manifests> < Element. Manifest. Location="elements. Element. Manifests> < /Feature> For the "0. GUID and create it by GUIDGEN2. We need an elements. Doc. Version: < ? ISO- 8. 85. 9- 1" ?> < Elementsxmlns="http: //schemas. Receivers. List. Template. Owner="0. 0BFEA7. E7. 17- 4. E8. 0- AA1. D0. C7. 1B3. 60. 10. List. Template. Id="1. Receiver> < Name> Item. Updated< /Name> < Type> Item. Updated< /Type> < Sequence. Number> 1. 00. Sequence. Number> < Assembly> Feature. Test, Version=1. 0. Culture=neutral, Public. Key. Token=3. 6d. Assembly> < Class> test. Test. Event. Receiver< /Class> < Data /> < Filter /> < /Receiver> < Receiver> < Name> Item. Added< /Name> < Type> Item. Added< /Type> < Sequence. Number> 1. 00. Sequence. Number> < Assembly> Feature. Test, Version=1. 0. Culture=neutral, Public. Test. Event. Receiver< /Class> < Data /> < Filter /> < /Receiver> < /Receivers> < /Elements> 3. We need the code for this feature and here with C#. In this case name the DLL you will create Feature. Test. dll in Visual Studio 2. SP1: using Microsoft. Share. Point; using System; namespace test{ class. Test. Event. Receiver : SPItem. Event. Receiver { publicoverridevoid Item. Updated(SPItem. Event. Properties properties) { Disable. Event. Firing(); // in Validate. Item it will fire an event, so disable here Validate. Item(properties); } publicoverridevoid Item. Added(SPItem. Event. Properties properties) { Disable. Event. Firing(); // in Validate. Item it will fire an event, so disable here Validate. Item(properties); } protectedbool Validate. Item(SPItem. Event. Properties properties) { SPSite site. V = null; SPWeb web. V = null; if (properties. List. Item. Id > 0 & & properties. List. Id != Guid. Empty) { try { site. V = new. SPSite(properties. Web. Url); web. V = site. V. Open. Web(); SPList sp. List = web. V. Lists. Get. List(properties. List. Id, false); SPList. Item Item = sp. List. Get. Item. By. Id(properties. List. Item. Id); // The internal number ist stored in _UIVersion // 1 for V0. V1. 0 // 5. V1. 1 // 1. V2. 0 //Item["WSSVNumber"] = Item["_UIVersion"]; // I'm using the string value Item["WSSVersion"] = Item["_UIVersion. String"]; Item. System. Update(); } catch// You will run into an exception in case the Column does not exist { // Put your exception code here } } returntrue; } } }4. Compile your DLL5. Put the DLL into the GAC by GACUTIL6. Install the feature by STSADM - o installfeature - filename Doc. Version\feature. xml.Activate the feature by the GUI or with STSADM8. Try it out how it works.Reference section: SDK for Microsoft Office Share.Point Server 2. 00.SDK for Windows Share. Point Services V3. Document Property Promotion and Demotion. Introduction to Columns. Event Fundamentals.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
October 2017
Categories |