B
BSimpson
I'm trying to do the following in a Word merge: I'm trying to calculate a
due-by date for court filings by having Word subtract 7 days from a court
hearing date entered through a merge prompt. The hearing date is from a
list of specific dates published by each of 3 different courts.
The merge prompts for a hearing date through a {fillin} field
I need to find how to have the merge itself calculate a due-by date that is
7 calendar days *prior* to the hearing date (it doesn't have to account for
weekends, holidays, or anything like that).
For instance, in response to the merge's prompt, I enter a hearing date of
7-31-03. I want to have the merge output the date of 7-24-03 with the
formatting being MMMM d, YYYY. I already know how to format the date output
with the \@ switch.
So, the output would be: "The hearing date is June 31, 2003, and the due-by
date is June 24, 2003."
Just for test purposes I threw the following together (obviously, {}will
actually be merge fields)
{set testdate{fillin "Enter the Hearing date."}}
{set duedate{ =({testdate} - 7)}}
The hearing date is: {testdate \@ "MMMM d, YYYY"}
The due date is: {duedate \@ "MMMM d, YYYY"}
entering this into Word with actual field codes and running the little
routine correctly prompts for the hearing date, but the due date displays
as -34.
I'm almost **certain** I've seen how to do this SOMEWHERE before, but I just
can't remember where or what the field coding was!! Is it maybe something
involving converting the input date to a serial-date format or something????
To be sure, I *could* just have the user enter the hearing date and then
also prompt for the due-by date to be entered, but I'd rather cut down on
the entry of extra data if possible! I *can't* go the opposite route,
having the user enter the due-by date and then just adding 7 days, as the
hearing dates are *very* specific.
I need to do this from within Word itself. Is there maybe a freebie add-in
or something???
Help???
Mucho-mega-thanks!
Brian
due-by date for court filings by having Word subtract 7 days from a court
hearing date entered through a merge prompt. The hearing date is from a
list of specific dates published by each of 3 different courts.
The merge prompts for a hearing date through a {fillin} field
I need to find how to have the merge itself calculate a due-by date that is
7 calendar days *prior* to the hearing date (it doesn't have to account for
weekends, holidays, or anything like that).
For instance, in response to the merge's prompt, I enter a hearing date of
7-31-03. I want to have the merge output the date of 7-24-03 with the
formatting being MMMM d, YYYY. I already know how to format the date output
with the \@ switch.
So, the output would be: "The hearing date is June 31, 2003, and the due-by
date is June 24, 2003."
Just for test purposes I threw the following together (obviously, {}will
actually be merge fields)
{set testdate{fillin "Enter the Hearing date."}}
{set duedate{ =({testdate} - 7)}}
The hearing date is: {testdate \@ "MMMM d, YYYY"}
The due date is: {duedate \@ "MMMM d, YYYY"}
entering this into Word with actual field codes and running the little
routine correctly prompts for the hearing date, but the due date displays
as -34.
I'm almost **certain** I've seen how to do this SOMEWHERE before, but I just
can't remember where or what the field coding was!! Is it maybe something
involving converting the input date to a serial-date format or something????
To be sure, I *could* just have the user enter the hearing date and then
also prompt for the due-by date to be entered, but I'd rather cut down on
the entry of extra data if possible! I *can't* go the opposite route,
having the user enter the due-by date and then just adding 7 days, as the
hearing dates are *very* specific.
I need to do this from within Word itself. Is there maybe a freebie add-in
or something???
Help???
Mucho-mega-thanks!
Brian