Re: Using dates during mail merge



Many thanks for this. I tried it out but couldn't make it work. I even tried
'tweaking' spaces and quotes (very much groping in the dark) to see it this
would do the trick. You included 'MyDate' and 'Date2' in your construction
but I cannot understand the function of 'Date2'. It is probably this element
that I have got wrong.

Peter Jamieson has suggested a solution that I have been able to make work.
This is great and really deals with my oringinal request. However, it is
irritating that I have not been able to make your 'ASK' routine to function
properly. If you have time to clarify, I shall be grateful. Please don'y
bother if you are too busy. Many thanks again.


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
    ... I am very grateful for your time ... 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: Using dates during mail merge
    ... Where Graham has "date2" you need to put the name of the field in the data source that you want to compare with ... You included 'MyDate' and 'Date2' in your construction ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Design Patterns and Functional programming
    ... On Tue, 10 Jul 2007 15:02:23 GMT, JXStern wrote: ... In EU a new one is under construction, AFAIK. ... One should compare the requirements. ...
    (comp.object)
  • Re: 1541 on a PC
    ... > if you compare the construction pages of the ... > http://sta.c64.org/xe1541c.html there are only a couple of wires that ... Prev by Date: ...
    (comp.sys.cbm)
  • Re: Photographic bight shiny objects?
    ... the particular construction that I prefer. ... compare several different alternatives to expensive ... "macro lenses", and showed several compartive images), ... I need to scale it up a bit (these are maybe 24 inches ...
    (rec.photo.digital.slr-systems)

Loading