Re: dsofile CustomProperties in document header
- From: "RikardM" <RikardM@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 8 Dec 2005 01:58:02 -0800
Thank you for your response.
You are correct, switching in and out of Print Preview will update the
fields in the header and footer area. This however will require user
interaction. Every time a user views a document they will have to switch in
and out of the Print Preview so this is not a solution for us. But it is
something we can tell our users to do while we look for a better solution so
it’s still helpful.
We currently show the documents to our users by sending the document in a
bit stream to an empty frame in internet explorer. Is it possible to open
word documents in embedded mode on a client computer with some kind of
property set so the document opens up in the Print Preview mode?
The code presented is more or less the code we use today; we have inserted
this into normal.dot which is the only way to automatically run an addin if
you open a word document embedded. Since this is word VBA code I assume we
have to either run it together with normal.dot or with word-automation on the
server.
Updating normal.dot with macro code that runs automatically every time a
word document is opened up has a few problems and the task to install it
everywhere is a problem in it self so we wish to avoid this. And running
word-automation in the server is something that Microsoft strongly recommends
against, and there is no way that will work with the current throughput of
documents on the server anyway.
What we are looking for is a way to update custom fields in the header and
footer of a document without user interaction and without using
word-automation on the server or running macro code inside normal.dot.
"Cindy M -WordMVP-" wrote:
> Hi =?Utf-8?B?UmlrYXJkTQ==?=,
>
> > How ever, updating the custom property with dsofile.dll doesn’t make the
> > field in the document header update to show the correct value in myVersion.
> > To be able to show the correct value the user will have to manually update
> > the contents of the field by for instance right clicking the field and
> > clicking [update field].
> >
> > What we wish to do is refresh the field inside the word document and then
> > resave the document so that the content of the field shows the correct value
> > when the document is opened.
> >
> I'm not quite clear on whether your solution will allow automating the document
> in a Word window, but...
>
> Generally, fields in the header/footer areas will update if you switch into/out of
> print preview or the print layout view.
>
> If that doesn't work, then you'd need to use code that access the header/footer
> range and forces a field update. Something along the lines of:
>
> Dim rng as Word.Range
> Set rng = ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range
> rng.Fields.Update
>
> Cindy Meister
> INTER-Solutions, Switzerland
> http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
> http://www.word.mvps.org
>
> This reply is posted in the Newsgroup; please post any follow question or reply in
> the newsgroup and not by e-mail :-)
>
>
.
- Follow-Ups:
- Re: dsofile CustomProperties in document header
- From: Cindy M -WordMVP-
- Re: dsofile CustomProperties in document header
- Prev by Date: Re: Problems with copyPicture
- Next by Date: Re: dsofile CustomProperties in document header
- Previous by thread: Re: Problems with copyPicture
- Next by thread: Re: dsofile CustomProperties in document header
- Index(es):
Relevant Pages
|