Using Custom Word 2003 Templates with Sharepoint Document Libraries

M

MLBeck

Our company is piloting a Sharepoint 2007 site for our team. We still
use Office 2003. I wanted to make our document templates, which come
with specialized toolbars and macros, available on the site. I have
found some instructions on the process of making these templates
useable in MOSS2007 and will pass along what I have found so far, but
we have not yet overcome the many hurdles Microsoft has put in the way
of using one of their products with another one of their products, and
we still have not deployed the templates. If there is an easier
process, I would love to know what it is, but this is what we have
been able to ascertain.

Here are the steps so far:

1. To install your template so that it appears as a selection for a
new document in a Document Library, see this:
http://grumpywookie.wordpress.com/2008/08/26/microsoft-word-template-dotx-sharepoint-contenttype/

2. You will then find that the template is available when you start a
new document but is not available when you open the document later.
This is because MOSS stores a copy of the template on the user’s
computer in a temp file and when the document is opened again, the doc
is still looking for the temp file, which it can’t find. MS offers a
solution here:

http://msdn.microsoft.com/en-us/library/bb421314(office.11).aspx#Word2007_CreateXEP

The above lists three simple steps.
a. Create the template-(we have done this)
b. Create an xml expansion pack and manifest file.—(we are stuck
here)
c. Create a macro that links new docs to the local template—(we
haven’t gotten this far yet)
d. Link the custom document template to the doc library—(this info is
found in step 1)

3. The msdn site lists the xml code for the two files you need, but if
you aren’t very familiar with xml, this can be a stumper. It also
turns out that the following site shows an error in the MS xml code
and corrected it here:


http://blogs.msdn.com/syedi/archive...pears-once-document-saved-sps-2003-moss..aspx

4. Luckily I have someone (Sam) helping me who knows more about
Sharepoint and programming than I do and showed me how to compose the
xml files.
For the schema file, you copy the code into Notepad and save it as a
txt file named “schema.xml”. (The msdn directions do not specify any
of this.)
In the “blogs.msdn” directions, you see he has used “BarbiTest” as his
sample name. You can make up anything for this—you just have to use
the same name in the other “manifest” file. You also have to get the
path to the “Forms” folder on Sharepoint where you stored your
template and insert this in the code.

5. Now you have to create the manifest file. This has several places
where you have to type in your template name and the path where it is
stored. The code also needs the GUID for the template. Generally you
can find the GUID by following these instructions:
http://nickgrattan.wordpress.com/2008/04/29/finding-the-id-guid-for-a-sharepoint-list/

But this doesn’t seem to work when you look at the template file
stored in the “Forms” folder. So Sam found a piece of software that
helped him find what he thinks is the GUID for the template.

http://weblogs.asp.net/soever/archi...tility-to-get-guid-s-and-attribute-names.aspx

6. Once you have saved both of those xml files, you need to “code
sign” the xml manifest file. First you need to create a digital
certificate to use when signing the manifest. I am not sure if any
digital certificate you create can work, but we created one to use for
this experiment in trying to get this whole process to work. Open the
VBE and select the template in question. Then select Tools/Digital
Signature and name your signature.


7. Now all you have to do is download the code signing tool:

http://www.microsoft.com/downloads/...F7-EB06-4A2C-8F6C-2767B174126F&displaylang=en

7. Then you have to know how to use this tool which must be launched
from the command line! Gosh, this is such an easy solution to using
these Microsoft products. Thanks, Bill. Sam and I got this far, but
for some reason, the tool returns an error in signing the manifest—
there is something wrong with the first line of the xml, which we
copied directly from the msdn site. So we are stuck at this point. Sam
is investigating. But once that task is complete, we still have miles
to go before we sleep.

I am astounded that Microsoft really thinks this is any kind of
solution for what has to be a common problem for corporate customers.
Does anyone know of a better way?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top