|
|
Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Hello, I have a MS-Word 2003 document that I send out regularly. The document has the following statement:
"Please return the survey form no later than August 1st".
When I open the document, I want the sys to insert the current date, plus 3 days later.
Example: When I open the document, the above statement reads:
"Please return the survey form no later than August 4th."
I have looked in several areas, but has had no luck. Can/will someone point me to some examples or samples of this process???
Thank you,
Charles L. Phillips
|
|
I am not sure where you want to insert it, but what you need to insert is
Format(DateAdd("d", 3, Date), "MMMM, d")
-- 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
"Charles Phillips" <tptbusines_2005[ at ]hotmail.com> wrote in message news:OEOQCv%23tGHA.1224[ at ]TK2MSFTNGP03.phx.gbl...
[Quoted Text] > Hello, > I have a MS-Word 2003 document that I send out regularly. > The document has the following statement: > > "Please return the survey form no later than August 1st". > > When I open the document, I want the sys to insert the current date, plus > 3 days later. > > Example: > When I open the document, the above statement reads: > > "Please return the survey form no later than August 4th." > > I have looked in several areas, but has had no luck. > Can/will someone point me to some examples or samples of this process??? > > Thank you, > > Charles L. Phillips > > > > >
|
|
Or look at http://www.gmayor.com/insert_a_date_other_than_today.htm
-- 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
"Charles Phillips" <tptbusines_2005[ at ]hotmail.com> wrote in message news:OEOQCv%23tGHA.1224[ at ]TK2MSFTNGP03.phx.gbl...
[Quoted Text] > Hello, > I have a MS-Word 2003 document that I send out regularly. > The document has the following statement: > > "Please return the survey form no later than August 1st". > > When I open the document, I want the sys to insert the current date, plus > 3 days later. > > Example: > When I open the document, the above statement reads: > > "Please return the survey form no later than August 4th." > > I have looked in several areas, but has had no luck. > Can/will someone point me to some examples or samples of this process??? > > Thank you, > > Charles L. Phillips > > > > >
|
|
Hello, Currently, in the file the date is: August 1st Whenever I open the file, I want the system to take in account the current system date, add 3 days, then display the result.
Examples: Current date displayed in file: August 1st. Current date of computer: August 5th When file is open, display: August 8th
I hope there is a little more clear...
I did look into "=DateAdd (used in MS-Access), but was not able to find ANY reference material with MS-Word, or how to apply in MS-Word
Thank you,
Charles L. Phillips
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> wrote in message news:%23mvoYTAuGHA.4968[ at ]TK2MSFTNGP03.phx.gbl...
[Quoted Text] >I am not sure where you want to insert it, but what you need to insert is > > Format(DateAdd("d", 3, Date), "MMMM, d") > > -- > 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 > > "Charles Phillips" <tptbusines_2005[ at ]hotmail.com> wrote in message > news:OEOQCv%23tGHA.1224[ at ]TK2MSFTNGP03.phx.gbl... >> Hello, >> I have a MS-Word 2003 document that I send out regularly. >> The document has the following statement: >> >> "Please return the survey form no later than August 1st". >> >> When I open the document, I want the sys to insert the current date, plus >> 3 days later. >> >> Example: >> When I open the document, the above statement reads: >> >> "Please return the survey form no later than August 4th." >> >> I have looked in several areas, but has had no luck. >> Can/will someone point me to some examples or samples of this process??? >> >> Thank you, >> >> Charles L. Phillips >> >> >> >> >> > >
|
|
What I would do is have a {docvariable varname} field in the document, then I would use code to set the variable to the required date and update the fields in the document.
If the document is a template, which I would recommend that it should be, then the code would be in a macro named autonew() in that template. If it is in the document itself, which I do not recommend as you will get a macro warning message when you open the document if the security level is set to medium (the minimum recommended) or, if you have it set to high, the code will just be ignored.
In either case, the code is the same:
With ActiveDocument .Variables("vMonth") = Format(DateAdd("d", 3, Date), "MMMM") .Variables("vDay") = Format(DateAdd("d", 3, Date), "d") .Fields.Update End With
and in the document, you would have the following fields where you want the date to appear
{ docvariable vmonth } { docvariable vday \* ordinal }
You must use Ctrl+F9 to insert each pair of field delimiters and Alt+F9 to toggle off their display.
-- 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
"Charles Phillips" <tptbusines_2005[ at ]hotmail.com> wrote in message news:OlAUavAuGHA.3392[ at ]TK2MSFTNGP04.phx.gbl...
[Quoted Text] > Hello, > Currently, in the file the date is: August 1st > Whenever I open the file, I want the system to take in account the current > system date, add 3 days, then display the result. > > Examples: Current date displayed in file: August 1st. > Current date of computer: August 5th > When file is open, display: August 8th > > I hope there is a little more clear... > > I did look into "=DateAdd (used in MS-Access), but was not able to find > ANY reference material with MS-Word, or how to apply in MS-Word > > > Thank you, > > Charles L. Phillips > > > > "Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> wrote > in message news:%23mvoYTAuGHA.4968[ at ]TK2MSFTNGP03.phx.gbl... >>I am not sure where you want to insert it, but what you need to insert is >> >> Format(DateAdd("d", 3, Date), "MMMM, d") >> >> -- >> 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 >> >> "Charles Phillips" <tptbusines_2005[ at ]hotmail.com> wrote in message >> news:OEOQCv%23tGHA.1224[ at ]TK2MSFTNGP03.phx.gbl... >>> Hello, >>> I have a MS-Word 2003 document that I send out regularly. >>> The document has the following statement: >>> >>> "Please return the survey form no later than August 1st". >>> >>> When I open the document, I want the sys to insert the current date, >>> plus 3 days later. >>> >>> Example: >>> When I open the document, the above statement reads: >>> >>> "Please return the survey form no later than August 4th." >>> >>> I have looked in several areas, but has had no luck. >>> Can/will someone point me to some examples or samples of this process??? >>> >>> Thank you, >>> >>> Charles L. Phillips >>> >>> >>> >>> >>> >> >> > >
|
|
This is more complex than you might imagine, but it can be done. See http://addbalance.com/word/datefields2.htm for information on the different kinds of ways to make a date calculation work. It includes links to utilities to create the fields and an explanation of different macros that can be used instead of fields. It also has a link to www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=249902 which is a document with various fields already created. Another resource is http://www.gmayor.com/insert_a_date_other_than_today.htm.
-- Charles Kenyon
Word New User FAQ & Web Directory: http://addbalance.com/word
Intermediate User's Guide to Microsoft Word (supplemented version of Microsoft's Legal Users' Guide) http://addbalance.com/usersguide
See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome! --------- --------- --------- --------- --------- --------- This message is posted to a newsgroup. Please post replies and questions to the newsgroup so that others can learn from my ignorance and your wisdom.
"Charles Phillips" <tptbusines_2005[ at ]hotmail.com> wrote in message news:OEOQCv%23tGHA.1224[ at ]TK2MSFTNGP03.phx.gbl...
[Quoted Text] > Hello, > I have a MS-Word 2003 document that I send out regularly. > The document has the following statement: > > "Please return the survey form no later than August 1st". > > When I open the document, I want the sys to insert the current date, plus > 3 days later. > > Example: > When I open the document, the above statement reads: > > "Please return the survey form no later than August 4th." > > I have looked in several areas, but has had no luck. > Can/will someone point me to some examples or samples of this process??? > > Thank you, > > Charles L. Phillips > > > > >
|
|
Hello, This is what I was looking for, but couldn't find ANY kind of reference material(s).
Thank you,
Charles L. Phillips
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> wrote in message news:O%23CDLAJuGHA.4968[ at ]TK2MSFTNGP03.phx.gbl...
[Quoted Text] > What I would do is have a {docvariable varname} field in the document, > then I would use code to set the variable to the required date and update > the fields in the document. > > If the document is a template, which I would recommend that it should be, > then the code would be in a macro named autonew() in that template. If it > is in the document itself, which I do not recommend as you will get a > macro warning message when you open the document if the security level is > set to medium (the minimum recommended) or, if you have it set to high, > the code will just be ignored. > > In either case, the code is the same: > > With ActiveDocument > .Variables("vMonth") = Format(DateAdd("d", 3, Date), "MMMM") > .Variables("vDay") = Format(DateAdd("d", 3, Date), "d") > .Fields.Update > End With > > and in the document, you would have the following fields where you want > the date to appear > > { docvariable vmonth } { docvariable vday \* ordinal } > > You must use Ctrl+F9 to insert each pair of field delimiters and Alt+F9 to > toggle off their display. > > -- > 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 > > "Charles Phillips" <tptbusines_2005[ at ]hotmail.com> wrote in message > news:OlAUavAuGHA.3392[ at ]TK2MSFTNGP04.phx.gbl... >> Hello, >> Currently, in the file the date is: August 1st >> Whenever I open the file, I want the system to take in account the >> current system date, add 3 days, then display the result. >> >> Examples: Current date displayed in file: August 1st. >> Current date of computer: August 5th >> When file is open, display: August 8th >> >> I hope there is a little more clear... >> >> I did look into "=DateAdd (used in MS-Access), but was not able to find >> ANY reference material with MS-Word, or how to apply in MS-Word >> >> >> Thank you, >> >> Charles L. Phillips >> >> >> >> "Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> >> wrote in message news:%23mvoYTAuGHA.4968[ at ]TK2MSFTNGP03.phx.gbl... >>>I am not sure where you want to insert it, but what you need to insert is >>> >>> Format(DateAdd("d", 3, Date), "MMMM, d") >>> >>> -- >>> 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 >>> >>> "Charles Phillips" <tptbusines_2005[ at ]hotmail.com> wrote in message >>> news:OEOQCv%23tGHA.1224[ at ]TK2MSFTNGP03.phx.gbl... >>>> Hello, >>>> I have a MS-Word 2003 document that I send out regularly. >>>> The document has the following statement: >>>> >>>> "Please return the survey form no later than August 1st". >>>> >>>> When I open the document, I want the sys to insert the current date, >>>> plus 3 days later. >>>> >>>> Example: >>>> When I open the document, the above statement reads: >>>> >>>> "Please return the survey form no later than August 4th." >>>> >>>> I have looked in several areas, but has had no luck. >>>> Can/will someone point me to some examples or samples of this >>>> process??? >>>> >>>> Thank you, >>>> >>>> Charles L. Phillips >>>> >>>> >>>> >>>> >>>> >>> >>> >> >> > >
|
|
Hello, This is what I was looking for, but couldn't find ANY kind of reference material(s).
Thank you,
Charles L. Phillips
"Charles Kenyon" <wordfaq[ at ]nospam.addbalance.com> wrote in message news:eb4UvnOuGHA.4336[ at ]TK2MSFTNGP06.phx.gbl...
[Quoted Text] > This is more complex than you might imagine, but it can be done. See > http://addbalance.com/word/datefields2.htm for information on the > different kinds of ways to make a date calculation work. It includes links > to utilities to create the fields and an explanation of different macros > that can be used instead of fields. It also has a link to > www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=249902 which is a document > with various fields already created. Another resource is > http://www.gmayor.com/insert_a_date_other_than_today.htm.> > -- > Charles Kenyon > > Word New User FAQ & Web Directory: http://addbalance.com/word> > Intermediate User's Guide to Microsoft Word (supplemented version of > Microsoft's Legal Users' Guide) http://addbalance.com/usersguide> > See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome! > --------- --------- --------- --------- --------- --------- > This message is posted to a newsgroup. Please post replies > and questions to the newsgroup so that others can learn > from my ignorance and your wisdom. > > "Charles Phillips" <tptbusines_2005[ at ]hotmail.com> wrote in message > news:OEOQCv%23tGHA.1224[ at ]TK2MSFTNGP03.phx.gbl... >> Hello, >> I have a MS-Word 2003 document that I send out regularly. >> The document has the following statement: >> >> "Please return the survey form no later than August 1st". >> >> When I open the document, I want the sys to insert the current date, plus >> 3 days later. >> >> Example: >> When I open the document, the above statement reads: >> >> "Please return the survey form no later than August 4th." >> >> I have looked in several areas, but has had no luck. >> Can/will someone point me to some examples or samples of this process??? >> >> Thank you, >> >> Charles L. Phillips >> >> >> >> >> > >
|
|
|