Field for day of the week?

E

Ed from AZ

I have a date in a block of text that gets manually changed with each
new report. I repeat that date at various places in the document
using a STYLEREF field. At one place, I would like to automatically
insert the day of the week of this date. Is that possible?

Ed
 
E

Ed from AZ

No, sorry. It's manually typed in as the date the report is due.
I've dreate a style for it, though, to use the STYLEREF fields to copy
it elsewhere in the document. Does that help any? 8>/

Ed
 
M

macropod

Hi Ed,

The simplest way is to bookmark your date and add a cross-reference to it from the header.

Cheers
 
J

Jay Freedman

Yes, it does help. You can use a formatting switch in a StyleRef field. For
example, if the style you created is named MyDate, then this field will show
the day of the week for the date that has the style:

{StyleRef MyDate \@ "dddd"}

Be aware that if the field refers to text that isn't a valid date, the field
result will just repeat the text (for example, if the style is applied to
the text "November 32, 2007" then the field will also show "November 32,
2007"). And if there is no text with that style, it will show an error
message.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
E

Ed from AZ

Thank you, Jay! That worked great!
Ed


Yes, it does help. You can use a formatting switch in a StyleRef field. For
example, if the style you created is named MyDate, then this field will show
the day of the week for the date that has the style:

{StyleRef MyDate \@ "dddd"}

Be aware that if the field refers to text that isn't a valid date, the field
result will just repeat the text (for example, if the style is applied to
the text "November 32, 2007" then the field will also show "November 32,
2007"). And if there is no text with that style, it will show an error
message.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ:http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.




- Show quoted text -
 

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