![]() |
|
#1
|
|||
|
|||
![]()
I am trying to figure out how to build a macro to use Find and Replace to look for specific text and replace that text with tomorrow's date.
Look for: datez replacement: yyyymmdd which needs to be tomorrow's date. Any help would be appreciated. Thanks tchase01 |
#2
|
||||
|
||||
![]()
Hi tchase01,
This requires far more than a simple Find/Replace, with you can't automatically add '1' to whatever the found string is. Furthermore, your datez Find string would have to be in a specified format, which you haven't told us the details of (is it yyyymmdd?).
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Here is an example of what I am trying to do below, search for the 'datezzz' and replace it with the following days date '20120302'. I have many articles in one file that i need to make this change to. I am using Word 2007. The datezzz format is just text, but I need it to be a date in text format 'yyyymmdd' as in the examples below:
Original <article> <filename>article.xml</filename> <timestamp>04:00:27</timestamp> <pubdate>datezzz</pubdate> <section>Business</section> <taxonomy>13</taxonomy> <keyword></keyword> Replacement <article> <filename>article.xml</filename> <timestamp>04:00:27</timestamp> <pubdate>20120302</pubdate> <section>Business</section> <taxonomy>13</taxonomy> <keyword></keyword> Thanks for looking and trying to help!!!! |
#4
|
||||
|
||||
![]()
Hi tchase01,
You don't really need a macro to replace 'datezzz' with tommorrow's date in YYYYMMDD format. You can do that with an ordinary Find/Replace, for which you can replace 'datezzz' with any YYYYMMDD string of your choice.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
Tags |
date, find and replace, macro |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
ketanco | Project | 1 | 02-08-2012 02:20 PM |
![]() |
Jamesb8488 | Word | 1 | 04-28-2011 02:54 PM |
Macro date and match valor | cg1980 | Excel Programming | 0 | 04-12-2011 09:38 AM |
![]() |
Phatmat | Word | 1 | 10-15-2009 08:38 AM |
![]() |
promark | Outlook | 1 | 12-23-2005 07:21 AM |