Replace old date with current date
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
Replace old date with current date
Hello,
How do I replace a date in a Word custom property with a new date, or better, the current date? Using a date format of mm/dd/yy.
I searched for *\/*\/* and wanted to replace with 01/21/13, but nothing was replaced.
Thank you.
How do I replace a date in a Word custom property with a new date, or better, the current date? Using a date format of mm/dd/yy.
I searched for *\/*\/* and wanted to replace with 01/21/13, but nothing was replaced.
Thank you.
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: Replace old date with current date
Hi Simon,
I did not try Wildcards. The date is in the Custom Property, "EffectiveDate". My goal is to find the current date and replace it with the current date. The entire footer looks like this:
FSSQA-F102/5.2 Corrective Preventive Action Request Page 1 of 1 Approved: TFS Effective: 4/3/2008
Your solution didn't make any changes, but then I didn't give you all of the information.
What can I try next?
Thank you,
Tom
I did not try Wildcards. The date is in the Custom Property, "EffectiveDate". My goal is to find the current date and replace it with the current date. The entire footer looks like this:
FSSQA-F102/5.2 Corrective Preventive Action Request Page 1 of 1 Approved: TFS Effective: 4/3/2008
Your solution didn't make any changes, but then I didn't give you all of the information.
What can I try next?
Thank you,
Tom
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: Replace old date with current date
If the date is in the Custom Property, did you set the search location to 'Custom properties'?
The wildcards I gave you won't work in the footer, instead, use the EasyPattern Search Replace type of:
The wildcards I gave you won't work in the footer, instead, use the EasyPattern Search Replace type of:
Code: Select all
[ 1-2 digits ]/[ 1-2 digits ]/[ 4 digits ]
Re: Replace old date with current date
Hi Simon,
I had chosen Custom Properties in Search Location and the new code changed the value of the Custom Property, EffectiveDate. However, the date shown in the footer did not change, in other words, the document didn't refresh. I had to press F9 to force the update. Can WordPipe force a field update?
Tom
I had chosen Custom Properties in Search Location and the new code changed the value of the Custom Property, EffectiveDate. However, the date shown in the footer did not change, in other words, the document didn't refresh. I had to press F9 to force the update. Can WordPipe force a field update?
Tom
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: Replace old date with current date
Yes! See the Options tab, Update field codes before save.
Re: Replace old date with current date
Hi Simon,
I had "Update field codes before save" checked and it did not update. Things just got really serious for me because I thought I had only 135 files to change, but I have 548 files! WordPipe is the only possible solution for me. If its alright with you, I'd like to combine this thread with my other thread on replacing the hyphen.
To reinterate, I'm using Word 2010 and my documents are a variety of .DOC, .DOCX, .DOTX .DOTM. The footer text is giving me all the trouble. The text that needs to be changed in the footers look like this:
FSSQA-F102/5.2 Effective: 4/3/2008
I need to make the footers look like this:
FSQA-F102-5.2 Effective: 2/1/13
The "FSS" becomes "FS" and the text "QA" will change depending on the document, as will the number following the "F" and before the "/". The number is one to three digits. In this example, the text in "FSSQA-F102" is in the "Document number" Built-in property field, the "5.2" is in the "DocRevision" Custom property field. The date is in the "EffectiveDate" Custom property field. The documents are protected, but the "unprotect" feature is working fine. I know this because that changes to the body text are correct.
Again, thank you for your time.
- Tom
I had "Update field codes before save" checked and it did not update. Things just got really serious for me because I thought I had only 135 files to change, but I have 548 files! WordPipe is the only possible solution for me. If its alright with you, I'd like to combine this thread with my other thread on replacing the hyphen.
To reinterate, I'm using Word 2010 and my documents are a variety of .DOC, .DOCX, .DOTX .DOTM. The footer text is giving me all the trouble. The text that needs to be changed in the footers look like this:
FSSQA-F102/5.2 Effective: 4/3/2008
I need to make the footers look like this:
FSQA-F102-5.2 Effective: 2/1/13
The "FSS" becomes "FS" and the text "QA" will change depending on the document, as will the number following the "F" and before the "/". The number is one to three digits. In this example, the text in "FSSQA-F102" is in the "Document number" Built-in property field, the "5.2" is in the "DocRevision" Custom property field. The date is in the "EffectiveDate" Custom property field. The documents are protected, but the "unprotect" feature is working fine. I know this because that changes to the body text are correct.
Again, thank you for your time.
- Tom
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: Replace old date with current date
Hi Tom,
The Options tab, Update field codes before save, will only occur if a change has been made to the document. So you might need to replace e.g FS with FS (ie itself) to trigger this change. Checking Options\Force Word to save changes may also help.
Please send us a sample document and your settings, either by zipping and uploading here in the forums, or by sending to our email address.
The Options tab, Update field codes before save, will only occur if a change has been made to the document. So you might need to replace e.g FS with FS (ie itself) to trigger this change. Checking Options\Force Word to save changes may also help.
Please send us a sample document and your settings, either by zipping and uploading here in the forums, or by sending to our email address.
Re: Replace old date with current date
Hi Simon,
There are several changes made to the document in the body, as well as in the footer. Attached are a sample document, not protected and one of my many WordPipe .wpp files. Thank you!!
Tom
There are several changes made to the document in the body, as well as in the footer. Attached are a sample document, not protected and one of my many WordPipe .wpp files. Thank you!!
Tom