Sharepoint 2007 with MS Office 2007 footers - sharepoint

We had a need for a document management solution and were hoping SharePoint 2007 would satisfy our needs. We felt our needs were relatively simple. We needed to manage versioning, have searching capabilities, and having an approval workflow.
SharePoint handled these three aspects great out of the box.
However, we also require that the footer on the Office 2007 (Word, Excel, and PowerPoint) documents reflect the document version, last person to modify, and last modification date. These things can be done with office automation, but we have yet to find a complete solution.
We first tried to do it on the checking-in and checked-in events and followed this path for a while, however, the complication we ran into was after we made the changes to the document we had to no way of preventing the save from updating the version number. This resulted in something similar to this:
Document checked-in – the document version should be v0.1 however it is v0.2 because we save the document after the footer is replaced. If we look in the document history we there are 2 separate versions v0.1 does not have the footer v0.2 has the footer but it says v0.1 as that is the version the document was when it was replaced.
This is an unacceptable solution for us as we want the process to be completely handled on the user side so they would have full control to revert back to a version where the footer would be incorrect and not contain the correct data. When we attempted to create a custom approval/check-in workflow we found that the same problem was present. The footer is necessary so that hard-copies can be traced back to their electronic counterpart.
Another solution that was proposed to us was to build plugins for office that would handle the replacement of the footer. This is inadequate for our needs as it requires a client side deployment of our plugins which is undesirable by our clients. What we are looking for is a clean solution to this problem.

Here is a blog post which seem to be exactly the solution of your problem.
Basically they create a custom field in the document library and use event receivers to keep the current version of the document in this field.
The "trick" is that on the client side this custom field shows up as a property of the document the value of which you can easily embed into the document's contents.
I'm not sure why changing the field won't increase the version of the document, but I guess it is because you're only changing metadata, not the actual document.
They do use a little VBA script which runs on the client side, but it doesn't require any client side deployment as it is downloaded with the document. However I'm not sure if any security settings changes on the client side may be needed to allow the script to run.

Does this information need to be in the footer? A lot of the information is available within the Office 2007 application. If you click on the round button in the upper left, and select "Server", you can view the version history, a lot of the other properties are available by clicking the round button and opening the "Prepare" menu, and selecting Properties.
If this information must be displayed in the document footer I would investigate creating a custom Information Management Policy. This may be a good place to start.

Related

SharePoint Quick Part Label Stopped Working

We are currently migrating our EDMS into SharePoint. As part of this workstream, I recently set up a SharePoint site with a Quick Part Label containing just the version number - as per the instructions here.
This worked fine in testing, now a few users have been added to the site and the migration works have begun. The option for "Label" within Quick Parts has simply dissapeared.
I tried some trouble shooting on Friday and found the following:
Recovering an old document from the recycle bin, still contain a correct version number label.
This label can be copy and pasted to a new document, and it correct applies the label quick part with the new documents version.
I set up a new test site and the Quick Part Label behaved exactly as expected, meaning the issue is within the Live SharePoint site itself.
I turned off labels and reset them. With no success.
I am opening in the app, the library has minor versions, check-in/check-out turned on (and currently approvals are turned off).
I also suspected that OneDrive sync might cause issues, but this again didn't seem to solve anything in the test site.
NB: this is also posted here, I will keep both threads up to date.
Screenshot showing label missing
Update 20/12/22
Since this morning I have now taken the following additional steps:
Added a new content type
Recreated the label for that content type
Change the content type of the document in the library, and the label
option now appears
This seems like a fix, but I am also curious as to limitations of
this method.
Limitations noticed so far: cannot edit SharePoint columns in the
details pane

Co-authoring when using WorkBook Settings/CustomProperties

I've been looking for any documentation which suggests whether there is a way of saving Document Settings & CustomProperties such that they're automatically propagated to co-authors of the current document.
I've done some testing which suggests that's these settings aren't automatically propagated even when the document is saved. I'm also storing XML inside the document so I'm concerned that this won't be propagated as well. Since I'm doing this in Excel, I could always create a hidden sheet to store the properties in and have a watch on the table (or some similar set-up) but this isn't really the avenue I want to go down since some user could easily come along and delete the hidden sheet or manipulate its contents.
Has anyone come across this issue and managed to find a solution to it?
Welcome to Excel JS world.
I have verified this issue, it looks like a co-auth bug in settings and custom properties API. We have created 2 bugs (BUG 4173957 and BUG 4173952) for tracking this issue.
As a workaround, you could use our beta API worksheet custom properties, which is in preview, this API support co-auth. You could try it out, please let me know if you have any suggestion on this API. thanks.

Create two edit button with different settings

I've created a version tracking that will show all the edited document inside view. What if I want to make all document be draft at the same time, and during that, document can't be edit. And after I click save, all draft document will be saved at the same time.
Edit 1
I have one more question when I do version tracking, how can I make all response document cannot be edit? only current document can be edit?
UPDATE QUESTION
Currently, I am using version tracking to show all list with all edit document. So for now, every time I click EDIT, it will show all history of updated.
So I want create a situation where I have 2 edit option which is EDIT and PC Specification. I want to set PC Specification after edit document, it updated all history under version tracking, but for EDIT I don't want it update under version tracking. Because, for EDIT function, it only for edit one or two information BUT for PC Specification, it is to update all information. For example, I have 3 documents inside the "Computer" view.
When I open one document, it will show document details. On top menu, I have two buttons which are Edit and Close Windows. So can I add one more toolbar? Which is PC Spec as below?
So I will click the PC Spec button on the toolbar then the documents will open as a new document with same document information. Same as edit function. After I click save, it overwrite document + show edit history
For another situation where I click EDIT, same as PC Spec but after I click save, it overwrite document only.
As shown below, the history is when document edit using PC Spec only.
Another question, I have "Archived" view. How can I show only history of document inside "Archived" view?
Hope you guys can understand this. Please ask me anything if you not understand. Any help will be appreciated. Thanks! :)
Regarding your second question, to make all response documents non-editable, you will have to
Give your regular users Author access instead of Editor access in the database's Access Control List and assign them a role, which I'll call "AppUsers".
Give yourself and anyone else who will be responsible for managing the app a role which I'll call "AppAdmins".
Add a hidden computed field with type "Authors" to the form and set the initial value formula to
#If(#IsResponseDoc;"[AppAdmins]";"[AppUsers]":"[AppAdmins]")
Note that this will not have any effect on existing documents until you refresh and re-save them.
Then, you're going to have to hope that automatic versioning refreshes the documents. I'm not sure if it does or does not. If it does not, then you're probably going to have to give up on using the native versioning and write your own version using LotusScript. As I recall, that's what was done in the standard Lotus document library template, because the native versioning is pretty limited in what it can do.
As for your first question, I'm sorry but I really don't understand what you're asking. I can't tell in some parts whether you are telling us what you have already done, or what you want to do. Here on StackOverflow, the best way to get useful answers is to show us very clearly what you have tried, tell us what happens, and tell us what you thought should have happened instead. This is a place for helping you fix your code, not a place to get tutorials that amount to explicit instructions on how to write your code in the first place.

Sharepoint html element naming conventions, by Sharepoint Controls

A few times I've attempted to customize a SP2007 page using css, html, or javascript in Sharepoint Designer; however, in Sharepoint Designer I am not able to get direct access to the desired elements since they are generated by a Sharepoint Control (such as a web part or dataview) and appear only AFTER the page is rendered in the browser. I use use IE's F12 to tracked the element I wish to change. Then I can see an identifer such as name or id I can use in my javascript or css.
Example 1: SP2007 generates "name=ctl00$PlaceHolderMain$g_ba9196a9_2842_4607_b048_9a443cb4def5$ff2_1$ctl00$ctl00$BooleanField" for an input text box. I use that name to manipulate the text box as I desire.
Example 2: SP2007 generates "id=zz6_menu" for the "Welcome" text which I use to get the users full name.
So far this has worked out fine. Am I tempting fate?
Can someone refer me to a reference that discusses how these names and other Sharepoint Control element identifiers are generated?
Are they stable? Can I count on them to be the same provided the application I develop with my version of SP isn't updated to a later version of SP? And even if that case I'm thinking I can simply update to the identifiers created by the newer version of SP.
Is this a good practice? Any other comments?
All responses are welcomed.
Thanks.
SharePoint is based on ASP.NET and that's why the Ids are automatically genereated.
cf this article.
You should not use them to identify elements on css or js.
Do not write code that references controls using the value of the
generated UniqueID property. You can treat the UniqueID property as a
handle (for example, by passing it to a process), but you should not
rely on it having a specific structure.
In my opinion, the best way is to rely on the css classes because they are not automatically generated and should not change a lot.
Anyway, if you upgrade to SP2010 or 2013, lot of your modifications won't work anymore because the structure and css changed...

Saving a document to SharePoint brings up "Web File Properties" dialog with incorrect metadata

Situation:
A custom "Master Document" content type inherits from Document
The "Master Document" content type has five additional choice fields
There are five custom "Document Template" content types that inherit from the "Master Document" content type
Each of the "Document Template" content types uses a different Word document template (.dot) file
Each of the "Document Template" content types have been added to a document library
Problem:
I click on a document in the library
Document opens up in Word 2003 for me to edit
I make some changes and save
A box pops up called "Web File Properties". The window contains all of my custom metadata properties and the ContentType field. The ContentType field is set correctly to the current content type. The other fields are reset to their default values. This same window can apparently be opened by going to File -> Properties
This window by itself would be fine except for two reasons:
It includes the ContentType column
All of my custom metadata properties are visible but are reset to their default values instead of whatever values were previously selected. This means, every time the user wants to save the document, they have to remember what properties were tagged and set them back.
Question:
Can I disable this Web File Properties box?
If no... can I get the fields that show up to be populated to their correct values?
If no... is there a way to disable my fields from displaying in this window?
If no... is this a SharePoint page that I can modify?
***Edit with some more information***
It looks like this only happens in Office 2003 and looks like it affects Choice fields. If I create the same column as a Lookup field, it seems to work.
Edit again
Looks like if the lookup field is a multi-select field then it will not show up in the Web File Properties box at all (single select lookups still work).
edit 10/14/2009
Link to the KB Article mentioned below by Brenda:
http://support.microsoft.com/kb/971500/
This is more of a workaround rather than an answer but I figured I might as well put it here in case it helps someone else.
It seems as if these issues with the Web File Properties box is specific to Office 2003. The issues I reported above seem to be fixed in Office 2007.
If you want to get it working in 2003 and you have choice/lookup fields in your Document content type, here is the summary:
Single select Choice fields DO NOT work
Multi select Choice fields DO work
Single select Lookup fields DO work
Multi select Lookup fields DO NOT work
FYI - I want to CORRECT my previous post. The fix DID FIX my problem after I deleted my internet cache. Works PERFECT now. Here is the KB you need: KB971500 I can email you the fix if you can't find it. The notes in the document do not describe the problem exactly as I would have, but it was the fix for my case.
bhartson#lbrealty.com
We have the EXACT problem. I've opened a case with Microsoft back in February and they were able to finally duplicate my problem.
I have been kept informed and told that my fix would be available with the JUNE cumulative upates. I just received a specific hotfix from my Microsoft rep and applied it and it still did NOT fix my problem. I am hoping he gave me the wrong one and has the real one to send me.
Thanks for your post. I'm may try some of your suggestions above but I just want Microsoft to fix this. We can't upgrade to Office2007!
Thanks.
man, this was really killing me, I spent an entire day recreating document libraries and all sorts of content-types and variations of my excel template before I figured this was a bug... At least MS has a little hotfix request thing now... they're going to send it to me I guess :\
I didn't test this in excel/office 2003 and really botched a presentation of our little workflow... embarassing... always test with the app & environment people are going to use!!!
thanks for the KB article number

Resources