I'm setting up a mail merge document which checks the dates in two fields and
if the difference is greater than or equal to 14, it then places a certain
statement into the document. I've tried to use DateDiff() directly but it
doesn't work. I tried creating a Function where the two fields are passed
ByVal to a function. Then within the function the DateDiff("D", sDate,
ThatDate) function is called and returns a yes or no value which would allow
the document to insert the appropriate statement. But how do I call the
function dynamically when the document merge is performed. I hope this is
clear. Can anybody help?.

Re: calling a function in word document dynamically. by Greg

Greg
Fri May 26 13:08:02 CDT 2006

Seems to me like that the data source would be the place to do this
before the merge. Couldn'tyou have a field in the data source that
held the condition and set the value in the merged documents based on
that field?


Re: calling a function in word document dynamically. by webXperience

webXperience
Mon May 29 12:09:02 CDT 2006

I am researching this for a client who has already set up a query in a
program called "TeleMagic." Which is a FoxPro app. They want to perform a
mail merge on data that doesn't fit this larger segment . Which is why they
are looking for a way to target the few while still accessing the other
major recipients list.

"Greg Maxey" wrote:

> Seems to me like that the data source would be the place to do this
> before the merge. Couldn'tyou have a field in the data source that
> held the condition and set the value in the merged documents based on
> that field?
>
>