Formulas?

C

cbremar

I have been requested to create a merge document. One of the fields that is
being requested is to calculate a date in the future (5 days from today, 89
days from, etc.). Can you create a field in a merge document that would
calculate something like that? If so, how would one do it?
 
P

Peter Jamieson

If possible, do this in your data source - e.g. if it's an Access/SQL Server
database, make a query/view that calculates date+5 or date+89, use that as
the data source and insert that field just like any other. That won't work
unless you know the number of days you need to add at the point when the
query is executed (which you may not know if, for example, the user types
the value into an ASK field).

Otherwise, download the macropod's attachment at :
http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=249902

You may also find http://tips.pjmsn.me.uk/t0004.htm useful.

Peter Jamieson
 
C

cbremar

I wish I could do that, but the data source, an Excel spreadsheet, will be
controlled by someone else. Thanks for the links. I'll take a look at them
to see if they contain what I need. In the meantime, do you know how I would
set up the merge field to calculate this info?

Thanks again.
 
P

Peter Jamieson

In the meantime, do you know how I would
set up the merge field to calculate this info?

The trouble is that the calculation using fields is not at all simple, which
is why you need the stuff in here: (it shows you how to do the calculations
using fields):

http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=249902

<<
I wish I could do that, but the data source, an Excel spreadsheet, will be
controlled by someone else.

You may still be able to do the calculation "in the data source" using Word
VBA to issue the necessary Jet SQL. It's described in the other article.

Peter Jamieson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top