Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / September 2005

Tip: Looking for answers? Try searching our database.

Invisible Multiple Fields in PageHeaders (Word 2003)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Roberto Villa Real - 19 Sep 2005 16:17 GMT
In Word 2000 or 97, the following fields used to work fine, even INSIDE THE
PAGEHEADER:

{if  
{DOCVARIABLE X \ *MERGEFORMAT} <>"." (condition)
{QUOTE {DOCVARIABLE X \*MERGEFORMAT} \@ "dd/mm/yy" \*MERGEFORMAT} (show this
if true)
{DATE \@ "dd/mm/yy" \*MERGEFORMAT} (show this if False)
}

If the variable X is ".", the fields show the actual Date.
If X is different (like X ="01/06/2005"), the fields show X in "dd/mm/yy"
format (so the result would be "01/06/05")

But (only) in Word 2003, and (only) if these fields are in the pageheader
(or footer), it simply show NOTHING when the condition is false (it should
show the Docvariable X in "dd/mm/yy" format)...
I´ve tested several other simplier IF fields in the pageheader, and they
result in "" (blank) only in Word 2003. Can someone help?
Doug Robbins - 19 Sep 2005 18:35 GMT
Sounds like the fields are not being updated.  Check the Update fields item
under Tools>Options>Print.  Then use Print Preview.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> In Word 2000 or 97, the following fields used to work fine, even INSIDE
> THE
[quoted text clipped - 17 lines]
> I´ve tested several other simplier IF fields in the pageheader, and they
> result in "" (blank) only in Word 2003. Can someone help?
Roberto Villa Real - 23 Sep 2005 19:30 GMT
Thanks for your answer...
But, the problem is not with the printings... The fields, when updated,
simply disappear in the screen, as well as in it´s printing.

Having tested it for several times, i concluded:

"IF" Fields, when reffering to other fields (Date, DocVariables, etc), do
not work when you put them inside the PageHeader, but only in Word 2003.

If you want to see it with your own eyes, i could send you a copy of this
document by email.

I think I´m right when I say that the problem is with Word2003, but I´d
preffer to be wrong, cause many people have been using the documents I
developed, and I´ll have to work hard to modify all of them to be used with
Word 2003.

Thanks a lot,
Roberto Villa Real

> Sounds like the fields are not being updated.  Check the Update fields item
> under Tools>Options>Print.  Then use Print Preview.
[quoted text clipped - 20 lines]
> > I´ve tested several other simplier IF fields in the pageheader, and they
> > result in "" (blank) only in Word 2003. Can someone help?
Doug Robbins - 23 Sep 2005 21:25 GMT
Please send me a copy of the document and I will check it out.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Thanks for your answer...
> But, the problem is not with the printings... The fields, when updated,
[quoted text clipped - 46 lines]
>> > they
>> > result in "" (blank) only in Word 2003. Can someone help?
Doug Robbins - 24 Sep 2005 22:53 GMT
Hi Roberto,

Using Word 2003 and the document that you sent to me, when I run a macro to
set a value to the document variable and then use Print Preview, I get the
opposite behaviour, the fields in the Header are updated, but those in the
body of the document are not (regardless of the setting of the Update fields
item under Tools>Options>Print).  To get the fields in the body to update,
it was necessary to select them and then press F9.

However, whenever I work with document variables and docvariable fields
(which is in virtually all of my templates), I include a routine to update
the fields where ever they appear so that the user immediately sees the
result.

For your document, I used the following and with that, everything is
displayed correctly.

Dim i As Long
With ActiveDocument
   .Variables("Data").Value = "25/12/2005"
   For i = 1 To .Sections.Count
       .Sections(i).Headers(wdHeaderFooterFirstPage).Range.Fields.Update
       .Sections(i).Headers(wdHeaderFooterPrimary).Range.Fields.Update
       .Sections(i).Footers(wdHeaderFooterFirstPage).Range.Fields.Update
       .Sections(i).Footers(wdHeaderFooterPrimary).Range.Fields.Update
   Next i
   .Range.Fields.Update
End With

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

> Please send me a copy of the document and I will check it out.
>
[quoted text clipped - 50 lines]
>>> > they
>>> > result in "" (blank) only in Word 2003. Can someone help?

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.