Re: Using dates during mail merge



Many thanks indded for this. I will try it out over the coming weekend and
let you know the result.
I am very grateful for your time



Graham Mayor wrote:
It appears there were two issues that prevented this from working here as
intended

1. I was using an ASK field to collect the date to compare thus

{ ASK MyDate "Start Date" \d { Date \@ "dd/MM/yyyy} \o }{ SKIPIF {
MERGEFIELD Date2 } <> "{ REF MyDate \@ "d " \*Ordinal}{ REF MyDate \@ " MMMM
yyyy" }" }

Unfortunately I was using one of my test data files which also had a field
called MyDate (unused in the merge) which conflicted with the bookmark of
the same name. With that fieldname changed it worked.

2. This construction will not work for a range of dates eg

{ ASK MyDate "Start Date" \d { Date \@ "dd/MM/yyyy} \o }{ SKIPIF {
MERGEFIELD Date2 } > "{ REF MyDate \@ "d " \*Ordinal}{ REF MyDate \@ " MMMM
yyyy" }" }

for that type of range you cannot compare dates with ordinal fields and must
revert to the switch I posted earlier. You cannot derive a date in the
format \@ "yyyyMMdd" from a field containing ordinal text.

Seems OK in both 2003 and 2000, with or without the quotes, which
leads me to wonder whether we are attempting the same thing and/or
[quoted text clipped - 86 lines]
--
Message posted via http://www.officekb.com

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/word-mailmerge/200802/1

.



Relevant Pages

  • Re: Using dates during mail merge
    ... You included 'MyDate' and 'Date2' in your construction ... I was using an ASK field to collect the date to compare thus ... This construction will not work for a range of dates eg ... for that type of range you cannot compare dates with ordinal fields and must ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Higher blood sugar better for patients with advanced heart failure?
    ... Why on Earth would you be grateful? ... How do public attitudes towards T1 diabetics now, compare with those ... of say, twenty, thirty, forty or even forty five years ago compare? ...
    (alt.support.diabetes)
  • Re: I dont understand
    ... make you miss your fave prog on TV to watch footie, they don't compare your ... cooking to their Mother's, they are grateful for even a teensie weensie ...
    (uk.people.silversurfers)
  • Re: Best savings rates help please
    ... > With £100K to put away I would be very grateful if someone could point me ... > to a good site where you can compare interest rates. ... tumbleweednews at hotmail dot com ... Prev by Date: ...
    (uk.finance)
  • extra space
    ... I'm running a macro to compare to sets of values, but it's not working because after one imported strings has a space on the end it. ... Grateful for any ideas to get round this problem. ...
    (microsoft.public.excel.programming)