Field for day of the week?

  • Thread starter Thread starter Ed from AZ
  • Start date Start date
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
 
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
 
Hi Ed,

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

Cheers
 
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.
 
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 -
 
Back
Top