Header date format changes in Print Preview

C

CRR

Hi,
I have the document createdate in the header, and need
the format to be MM/DD/YY. Looks great when the document
is opened, but Print Preview changes it to MM/DD/YY
HH:MM:SS. How do I get my format to stick?
 
G

Graham Mayor

CRR said:
Hi,
I have the document createdate in the header, and need
the format to be MM/DD/YY. Looks great when the document
is opened, but Print Preview changes it to MM/DD/YY
HH:MM:SS. How do I get my format to stick?


With the header open press ALT+F9 to display the field content.
Change the switch to
{CREATEDATE \@ "MM/DD/YY"}
Press F9 to update and if necessary ALT+F9 to toggle the display back again.
Close the header.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>><
 
C

CRR

Hi,
Thanks, but I still have a problem.

I made the change as you suggested, and it looked great
in both normal and print preview. The problem is that
when I save and close the document, then reopen it. It
looks fine in normal view, but in print preview...doggone
it...the HH:MM:SS come back.

Chris
 
D

Doug Robbins - Word MVP

When you display the field codes in the re-opened document, what formatting
switch do you see?

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
C

CRR

Hi,
Well, right now the field codes are:
{CREATEDATE \@ "MM/DD/HH" \* MERGEFORMAT}

I have also tried CHARFORMAT, as was suggested in this
forum, and with neither MERGEFORMAT nor CHARFORMAT.

I have run through a number of different date formats as
well.

This Word document is used in a larger Powerbuilder
application, which feeds data into the bookmark fields.
The customer wants to see the date that a particular
document was created in the header, and CREATEDATE works
well for this. The only problem is that, on a second
viewing of the an existing document, the hours and
minutes always appear in the date.

Thanks for your time!
Chris RR
 
G

Graham Mayor

{CREATEDATE \@ "MM/DD/HH" \* MERGEFORMAT}
What's that all about?
That will give you (at this moment) 06/08/14
What you should have is
{CREATEDATE \@ "MM/DD/YY"}
which will give you
06/08/04

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>><
 
G

Guest

My error, it is MM/DD/YY.
-----Original Message-----
{CREATEDATE \@ "MM/DD/HH" \* MERGEFORMAT}
What's that all about?
That will give you (at this moment) 06/08/14
What you should have is
{CREATEDATE \@ "MM/DD/YY"}
which will give you
06/08/04

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>><






.
 
D

Doug Robbins - Word MVP

You don't need either the \* MERGEFORMAT or \* CHARFORMAT

In the document that displays {CREATEDATE \@ "MM/DD/YY"} when you toggle off
the display of field codes and update the field using F9, what is displayed.

How PowerBuilder been in the act before this problem occurs. Seems to me
that it's a bit incompatible with Word based on posts to these newsgroups.


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
C

CRR

OK, I've tried it without either the MERGEFORMAT or the
CHARFORMAT. The field is defined as:
{CREATEDATE \@ "MM/DD/YY"}

When I first view the form, the field displays as
06/09/04. In Print Preview, I see: Jun. 9, 04 2:13 PM

I can toggle to the field view & it is still:
{CREATEDATE \@ "MM/DD/YY"}

but I can F9 toggle right back to: Jun 9, 04 2:13 PM

So it's not using the field format at all. *SIGH*
 
D

Doug Robbins - Word MVP

I don't know if it will make any difference, but the switch should be
"MM/dd/yy"

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
C

Charles Kenyon

Any chance you have two fields, one in a frame or textbox overlapping the
text field?

Try Alt-F9 to view field codes. That will pick up fields not displayed with
Shift-F9.

I've been following this thread and what you are describing is truly
bizarre.
 
C

CRR

Tried, that, thanks, but same results
-----Original Message-----
I don't know if it will make any difference, but the switch should be
"MM/dd/yy"

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP


.
 
C

CRR

Hello, Again,

I've found that, if I put the CREATEDATE in the body of
the document, bookmark it, then refer to the bookmark in
the header, then the proper formatting is retained. Both
the date and the format are good, but...

The problem is that I don't want to see that date in the
body of the document. I have tried making the body field
hidden text. This formatting is picked up in the header
and then the date is hidden there as well. I've also
tried making the body text white (OK, cheating here...)
and setting the text in the header to black, but that
doesn't work, either.

Anyone have any more ideas?

Chris
 
C

Charles Kenyon

Make the text in the body white (instead of hidden). In your ref field (or
StyleRef field) use the \* CharFormat switch.
 

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