Sharepoint Document Library change request!

Ohoi Sharepoint Dev Team!

We're working on a vertical solution for Lawyers which, as we all know, produce a hell of alot of documents. Sharepoint might aid them in sparing the rainforest for a couple of more years but we need to make document production even more sleek.

We are planning LawCase Workspaces with document libraries for each well defined document type. These libraries have dedicated Word templates. The templates have document properties which are mapped into the document as fields. We also map the document properties to document library metadata columns for searching purposes.

To make it even more efficient we set the default values of the metadata columns (SPField) to LawCase related stuff.

Now, in an ideal world two things would be true:

1. When I click New Document in the document library I would be asked for document properties before, not after the document opens. This way the users could enter a values or accept the default values set in the library (SPFields).

2. If the document template has corresponding document properties these values would be mapped and appear in the fields placed around the document template when the document opens.

The way this works today is that you get to open a new document right away based on the template. When you save this document back to the library you'll get the Web File Properties dialog and you can enter values. The default values set in the document library, however, will not appear if the document template have the fields predefined. The reason for this is that Word does not allow null values for DocProperties, and naturally assumes that "if you have a value for this already, I won't suggest the default value I've got".

You can hack around the no-null-value thing by opening a document based on the template in Microsoft Script Editor and alter the XML for the CustomDocumentProperties so the elements contain nothing. In this scenario the Web File Properties dialog will briefly (0,2 secs) show the default values before erasing them.

Currently the only solution I've found is to actually remove the CustomDocumentProperties elements from the XML (not the root Custom element), but leaving the references in the document itself. This will produce fields that initially show Error! Unknown document property name. When the document is saved to the doclib for the first time the default values will appear, and they will show up in the document as soon as you press F9 to update the field

To sum up: Make it easier to set all kinds of document properties when creating documents from Sharepoint so that they can be inserted as fields in templates while at the same time act as metadata for search.

 

No Comments