OT: MS Word properties manipulation

  • Thread starter Thread starter darrel
  • Start date Start date
D

darrel

This is probably more of an MS Word question than .net, but let me try to
explain what I want to do:

We have a bunch of forms in MS word format. We want to come up with a
standard naming convention that integrates a bunch of meta information about
the file into something like this:

SHC-EN-4-Form_for_divorce-042005.doc

Having everyone name the file manually will likely lead to mistakes, so I'm
suggesting that as they upload the document to our server via our Document
Management app, I'll rename the file programatically via .net using the
information they provide when they upload.

The catch is that every document has a footer (in word) that will also list
the filename.

My question is if there is any type of word tag or special object that could
be put into the footer of the file that would automatically update itself
whenever the filename is changed?

-Darrel
 
Hmm...just realized there is 'sort-of' this option in Word 2003.

You can do an INSERT >> AUTOTEXT >> HEADER/FOOTER >> FILENAME

That works great, but doesn't seem to automatically update itself if the
filename is changes.

Is there any sort of 'update' trigger that could be sent to the word file
from .net?

-Darrel
 
On the server, you could probably update the latest name as one of the
default properties for the document. When the document opens, the footer
could reference that text as the filename.

You need to use dsofile.dll to get at the properties.

http://support.microsoft.com/default.aspx?scid=kb;en-us;253338

The one thing I'm not clear on is how the word file will automatically grab
a property value and insert it into itself as text. Can that be done without
an embedded macro?

-Darrel
 
With the cursor in the footer, go to Insert > Field > DocProperty > Author >
OK
 
Hmmm. It seems to want an F5. Best to go to a Word programming newsgroup as
this is far off-topic here.
 
Hmmm. It seems to want an F5. Best to go to a Word programming newsgroup
as
this is far off-topic here.

Gotcha. So, sounds like this may have to be done on the Word-side of things.
Will see what I can find... thanks!

-Darrel
 
Back
Top