Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / June 2005

Tip: Looking for answers? Try searching our database.

Add 30 days to Date

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JDP@Work - 09 Jun 2005 19:58 GMT
I need to add 30 or 45 days to the current date.
I've followed a few links, that for example add 301 days to a date I get the
wrong date but it's not so noticable, it's off by a month or so, and if I add 30
days I get exactly 90 days out!

Trying different inputs I get similar wrong dates.

So, please test any link you send.

TIA

JeffP.....
Doug Robbins - 09 Jun 2005 20:35 GMT
Either run a macro when you have the cursor in the location where you want
the date to appear that contains the folloinwg code

Selection.InsertBefore Format(DateAdd("d", 30, Date), "MMMM d, yyyy")

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

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

>I need to add 30 or 45 days to the current date.
> I've followed a few links, that for example add 301 days to a date I get
[quoted text clipped - 10 lines]
>
> JeffP.....
JDP@Work - 10 Jun 2005 02:09 GMT
I'm so sorry, I forgot to mention that I use my documents as templates for an
automated process.

The print function I use is similar to a right-click print in the file manager
Windows Explorer.

So, macros that depend on humans won't work.

I've got some what of a solution.

Originally I was asked to use the request date, however there are often delays
in processing a request that is no fault of the client's, so I instead use the
first printing date, then the first follow up and finally the the final follow
up dates detecting only a true condition for each adding 15 days to the second
request letter that is sent out 15 days after the first letter.  But as noted
some cases the second letter could have a delay and it will still give the
client 15 days.

Please complete the application by {if{appreqfu1)<' ' {ddeauto appreqdt+30}\@
"MMMM d, yyyy"}{if{appreqfu1)>' ' {ddeauto appreqfu1+15}\@ "MMMM d, yyyy"}

Thanks to all....

JeffP.....

> Either run a macro when you have the cursor in the location where you want
> the date to appear that contains the folloinwg code
[quoted text clipped - 17 lines]
> >
> > JeffP.....
Peter Jamieson - 10 Jun 2005 18:25 GMT
If you are still monitoring this thread, I would be interested to know
exactly what the text in your ddeauto field is, and what kind of thing
"appreqt" is.

Thanks,

Peter Jamieson

> I'm so sorry, I forgot to mention that I use my documents as templates for
> an
[quoted text clipped - 53 lines]
>> >
>> > JeffP.....
JDP@Work - 10 Jun 2005 19:41 GMT
It is a date field from an MSSQL database that is passed as a dBase expression,
that when I add 30 is shows the date 30 days in advance.

excerpt snipit...
{if"{ddeauto goldmine data (contact2->uappreqfu1)}">' ' {ddeauto goldmine data
contact2->uappreqfu1+15}\@"MMM d, yyyy"}

You will notice that I have two similar fields, only one prints the date+30 or
date+15 depending on the boolean of a date in the first followup field.

I've gotten around my original problem by using my last printed dates and adding
the appropriate remaining days.

The only thing is; say a letter was printed 7 days ago, but for some reason it
was wrong and was not sent out.

I don't want my users having to find that record in the database, the QA person
just does their task to set it to reprint and later that day it does.

But it would add 30 or 15 days to the 7 days old last followup print date.

What would be best is if I could add the correct days to the print date in the
doc depending on if the last print date had a value, but not evaluate the date,
just say yes or no and add 30 or the remaiing 15 days.

TIA

JeffP.....

> If you are still monitoring this thread, I would be interested to know
> exactly what the text in your ddeauto field is, and what kind of thing
[quoted text clipped - 61 lines]
> >> >
> >> > JeffP.....
Peter Jamieson - 10 Jun 2005 22:49 GMT
Hi JeffP,

Thanks for the clarification re. DDEAUTO. There are a couple of other
possible approaches to this but since it seems you have found one that works
I wouln't be inclined to touch it.

Re. the business of reprinting stuff, I suspect I have not fully understood
but can only suggest that
a. once /Word/ thinks you have printed, and the document is saved, the
document is going to contain the date Word thought you had printed it on. It
doesn't know that someone threw the thing in the bin.
b. so I suspect what really needs to change is the procedure - i.e.,
someone has to start slightly further back in the process and do a
"re-merge", rather than just doing a "reprint".

Peter Jamieson

> It is a date field from an MSSQL database that is passed as a dBase
> expression,
[quoted text clipped - 103 lines]
>> >> >
>> >> > JeffP.....
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.