{"id":1452,"date":"2007-11-14T18:22:19","date_gmt":"2007-11-15T02:22:19","guid":{"rendered":"https:\/\/blogs.plm.automation.siemens.com\/t5\/Polarion-Blog\/Microsoft-Office-and-Subversion-Part-2\/ba-p\/380591"},"modified":"2026-03-26T05:38:39","modified_gmt":"2026-03-26T09:38:39","slug":"microsoft-office-and-subversion-part-2","status":"publish","type":"post","link":"https:\/\/blogs.sw.siemens.com\/polarion\/microsoft-office-and-subversion-part-2\/","title":{"rendered":"Microsoft Office and Subversion (Part 2)"},"content":{"rendered":"<p>In Part 1, we worked out how you access your documents located in a Subversion repository.<br \/>\nIn this part we will discuss several ideas how you could expose Subversion meta data, like version information, (last) author, date and so on in your document.<br \/>\nCurrently, it is very annoying always to update version number. Most time it will be forgotten and the document is being published to third parties with wrong version number leading to confusion. Let Subversion take care on document properties.<\/p>\n<p>We have two possibilities to expose Subversion information, direct and via Microsoft Office document properties and field operators.<br \/>\n<H2>\u201cDirect\u201d Exposure<\/H2><br \/>\nThis method is pretty straight forward. Just type in somewhere in your document following placeholders:<\/p>\n<p>$Author::                     $<br \/>\n$Rev::         $<br \/>\n$Date::                                         $<\/p>\n<p>You can put one these entries in any place, header page or page header and\/or footer are usual locations. By entering blanks between the double colon \u201c::\u201d and the last \u201c$\u201d you reserve space even in the binary formats of Microsoft Office.<br \/>\nAfter committing you document back into server, Subversion replaces each time the placeholders and it looks like this:<\/p>\n<p>$Author:: neherr                    $<br \/>\n$Rev:: 150     $<br \/>\n$Date:: 2007-09-26 07:52:07 +0200 (Wed, 26 Sep 2007)$<\/p>\n<p>It does not look nice but it is useful. If you like to reformat this ugly information after an update, you need to throw an eye on the next method for Subversion meta data exposure.<\/p>\n<p><STRONG><EM>Hint    Experienced Subversion users should not play with plain placeholders you normally use in text files, like \u201c$Rev$\u201d, i.e. without blanks to preserve space for Subversion data. After a commit your document is scrambled and you cannot read nor open it anymore.<\/EM><\/STRONG><br \/>\n<H2>Exposure through Microsoft Office Fields<\/H2><br \/>\nBefore we can use fields, we define document properties which Subversion updates with each commit.<br \/>\nOpen Microsoft Office document properties dialog as shown on the right side.<\/p>\n<p>I added the screen-shot for proud owners of the new Microsoft Office 2007. In the first weeks, most time spending not with writing documents but to search features and functions known from former versions but moved (hidden?) to new locations. You click on this round Office symbol on the top left corner and you will find the properties under the topic \u201cPrepare\u201d.<\/p>\n<p>A big bar above of your document opens. Click on the \u201cI\u201d info button and select \u201cAdvanced Properties&#8230;&#8221;.<\/p>\n<p>Owners of the \u201cold\u201d versions just open the \u201cProperties\u201d to be found in the \u201cFile\u2026\u201d menu.<\/p>\n<p><A href=\"http:\/\/community.plm.automation.siemens.com\/legacyfs\/online\/siemensplm_blogs\/2007\/11\/advancedproperties.gif\" title=\"advancedproperties.gif\" rel=\"nofollow noopener noreferrer\"><IMG src=\"http:\/\/community.plm.automation.siemens.com\/legacyfs\/online\/siemensplm_blogs\/2007\/11\/advancedproperties.gif\" alt=\"advancedproperties.gif\" \/><\/A><\/p>\n<p>Finally, finally, we landed in the right dialogue to define our properties.<\/p>\n<p>Click on the \u201cSummary\u201d tab and enter the Subversion placeholder for author as shown, if the document author should be maintained by Subversion here.<br \/>\nPlease be aware that Subversion\u2019s understanding of author is the person who updated the document most recently.<\/p>\n<p><A href=\"http:\/\/community.plm.automation.siemens.com\/legacyfs\/online\/siemensplm_blogs\/2007\/11\/fixedlength.gif\" title=\"fixedlength.gif\" rel=\"nofollow noopener noreferrer\"><IMG src=\"http:\/\/community.plm.automation.siemens.com\/legacyfs\/online\/siemensplm_blogs\/2007\/11\/fixedlength.gif\" alt=\"fixedlength.gif\" \/><\/A><\/p>\n<p>Next click on \u201cCustom\u201d tab and enter two new custom properties. Please have a look on the screen-shot on the right hand side.<\/p>\n<p>The name you enter is up to you. Define type as \u201cText\u201d and in value you enter the Subversion placeholder as described in first section of this blog.<\/p>\n<p>With the following step we are using fields to show Subversion meta data information in our document.<br \/>\nClick somewhere in your document where you like to show Subversion meta data and enter &lt;Ctrl&gt;F9. A pair of bracket appears. Enter following between the two brackets:<br \/>\nMy first SVN property shown in my document: <EM>{ DOCPROPERTY Author # MERGEFORMAT }<\/EM>.<br \/>\nNow the second follows: <EM>{ DOCPROPERTY  SVNRevision # MERGEFORMAT }<\/EM>.<\/p>\n<p>Now the third one: <EM>{ DOCPROPERTY  SVNLastUpdate # MERGEFORMAT }<\/EM>.<br \/>\n\u2026<\/p>\n<p>The string after the \u201cDOCPROPERTY\u201d corresponds with the name of your custom property you entered above.<br \/>\nAfter you checked in your document select the entire document by pressing &lt;Ctrl&gt;A, et viol? .<\/p>\n<p>Instead of the field definition you see the field content, like this:<\/p>\n<p>My first SVN property shown in my document: <EM>$author:: neherr     $<\/EM>.<br \/>\nNow the second follows: <EM>Revision: $Rev:: 151  $<\/EM>.<\/p>\n<p>Now the third one: Last change date: <EM>$Date:: 2007-09-26 23:01:48 +0200 (Wed, 26 Sep 2007#$<\/EM>.<br \/>\n\u2026<\/p>\n<p>Due to the fact that the data exposed in both methods looks pretty ugly, macros could be triggered to cleanup and format Subversion revision information.<br \/>\nFor this purpose it is much better to check out blogs on Microsoft\u2019s web site.<\/p>\n<p>Best Wishes<br \/>\nRobert<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Part 1, we worked out how you access your documents located in a Subversion repository.<br \/>\nIn this part we will discuss several ideas how you could expose Subversion meta data, like version informati&#8230;<\/p>\n","protected":false},"author":68985,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spanish_translation":"","french_translation":"","german_translation":"","italian_translation":"","polish_translation":"","japanese_translation":"","chinese_translation":"","footnotes":""},"categories":[1],"tags":[],"industry":[],"product":[],"coauthors":[],"class_list":["post-1452","post","type-post","status-publish","format-standard","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts\/1452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/users\/68985"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/comments?post=1452"}],"version-history":[{"count":1,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts\/1452\/revisions"}],"predecessor-version":[{"id":1453,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts\/1452\/revisions\/1453"}],"wp:attachment":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/media?parent=1452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/categories?post=1452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/tags?post=1452"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/industry?post=1452"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/product?post=1452"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/coauthors?post=1452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}