Date Calculations In Word

J

JE

Good Day!

I'm trying to perform some calculations on date values merged into a Word
document, but am having some problems. I'm able to use other merge fields in
calculations, but can't find how to do it with dates.

Basically what I'm trying to accomplish is very simple. I just need to take
a merged field, add a number of days to it, and display the result. For
example I tried
{={MERGEFIELD "ProductionDate"}+{=15}}
but the result in this case is 15. Even though it is correctly resolving the
production date.

Any help would be greatly appreciated.
 
E

Emily Lin

Hi Jeff,

The formula field {={Date} + 15} is not recognized. You will receive a Syntax Error in Word.

You can produce a result of sorts by using {={Date \@ "dd"}+14} to only calculate the day. However, it may exceed 31st date.

It is possible to construct a field combination that will provide the required result, but it is so complex. Refer to the following webpage
to see if it is helpful for you.
http://www.gmayor.com/insert_a_date_other_than_today.htm

Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience
to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft
cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are
inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely
understand the risk before retrieving any software from the Internet.

In addition, we support the break/fix issues in the managed technet newsgroups. If you need further assistance with this coding/macro
issue, please consider the resource:

MSDN newsgroups for peer experiences and recommendations. I have provided link as below:
http://msdn.microsoft.com/newsgroups/default.asp

If anything is unclear or if you have any other concerns, please don't hesitate to contact me.

Regards,

Emily Lin

Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
====================================================
When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue.
====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
J

JE

Thanks,
I think I'll try using the code, but if it gets too bad I'll just scrap the
idea.

--
JE


Emily Lin said:
Hi Jeff,

The formula field {={Date} + 15} is not recognized. You will receive a Syntax Error in Word.

You can produce a result of sorts by using {={Date \@ "dd"}+14} to only calculate the day. However, it may exceed 31st date.

It is possible to construct a field combination that will provide the required result, but it is so complex. Refer to the following webpage
to see if it is helpful for you.
http://www.gmayor.com/insert_a_date_other_than_today.htm

Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience
to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft
cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are
inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely
understand the risk before retrieving any software from the Internet.

In addition, we support the break/fix issues in the managed technet newsgroups. If you need further assistance with this coding/macro
issue, please consider the resource:

MSDN newsgroups for peer experiences and recommendations. I have provided link as below:
http://msdn.microsoft.com/newsgroups/default.asp

If anything is unclear or if you have any other concerns, please don't hesitate to contact me.

Regards,

Emily Lin

Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
====================================================
When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue.
====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
E

Emily Lin

Hello Jeff,

Hope the code works fine! In addition, if the data source "ProductionDate" is in Excel, may you add a new column to plus 15 days on the
original ProductionDate column to workaround it.

If you have any other questions or concerns, please do not hesitate to contact me. It is always my pleasure to be of assistance.

Have a nice day!

Emily Lin,
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security


======================================================
When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
Thread-Topic: Date Calculations In Word
thread-index: AchOz8OH0LD1s7K/Saagfsgqb6Qyeg==
X-WBNR-Posting-Host: 207.46.193.207
From: =?Utf-8?B?SkU=?= <[email protected]>
References: <[email protected]> <[email protected]>
Subject: RE: Date Calculations In Word
Date: Fri, 4 Jan 2008 04:46:02 -0800
Lines: 91
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992
Newsgroups: microsoft.public.office.misc
Path: TK2MSFTNGHUB02.phx.gbl
Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.office.misc:35205
NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
X-Tomcat-NG: microsoft.public.office.misc

Thanks,
I think I'll try using the code, but if it gets too bad I'll just scrap the
idea.
 

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