WORD MACRO: Search for date fields and replace result

Diskutiere und helfe bei WORD MACRO: Search for date fields and replace result im Bereich Microsoft Office im Windows Info bei einer Lösung; Hi I'm working on a solution to search date fields in Word and replace the result. Replacing the result should be easy but how can I search for date... Dieses Thema im Forum "Microsoft Office" wurde erstellt von Robin Huber, 9. September 2020.

  1. WORD MACRO: Search for date fields and replace result


    Hi


    I'm working on a solution to search date fields in Word and replace the result. Replacing the result should be easy but how can I search for date fields?
     
  2. Robin Huber Win User

    WORD MACRO: Search for date fields and replace result

    Just the "normal" DATE field that looks like this or something: { TIME \@"dd.MMM.yyyy"} but also other formats of this field if possible.

    Yeah some of this fields are in the headers or footers.

    Thank you very much!
  3. CharlesKenyon IA Win User

    WORD MACRO: Search for date fields and replace result

    Yes.

    So, any kind of Date field or just DATE fields?

    Are any of these fields in textboxes or shapes or headers or footers?
  4. Robin Huber Win User

    WORD MACRO: Search for date fields and replace result

    Hi Robin,

    The simplest way is to toggle the display of field codes and then search for ^d DATE. If you are on a Windows computer you would toggle the display of the field code using the keyboard shortcut Alt+F9 (or, on some computers Fn+Alt+F9). Are you planning on doing
    this with a macro? Your title would appear to request this.

    Are your fields DATE fields or CREATEDATE or SAVEDATE or PRINTDATE? See my page on the different date fields in Word.

    http://addbalance.com/word/datefields1.htm

    What is it you want to replace them with?

    This forum is a user-to-user support forum. I am a fellow user.

    I hope this information helps.

    Please let me know if you have any more questions or require further help.

    You can ask for more help by replying to this post (Reply button below).

    Stay well
    Hi Charles

    Thank you for your answer!

    Yes I want to do this with a macro. I want to replace all datefields with (for example) "hello". I have a macro that replaces all fields with "hello". But I want that only date fields get replaced.

    Can you help me with this?
  5. Robin Huber Win User

    WORD MACRO: Search for date fields and replace result

    Thank you very much! This works fine. I'll test it with my documents and give you another feedback.

    Thank you!!

    Best Regards,

  6. CharlesKenyon IA Win User

    WORD MACRO: Search for date fields and replace result

    Hi Robin,

    The simplest way is to toggle the display of field codes and then search for ^d DATE. If you are on a Windows computer you would toggle the display of the field code using the keyboard shortcut Alt+F9 (or, on some computers Fn+Alt+F9). Are you planning on doing
    this with a macro? Your title would appear to request this.

    Are your fields DATE fields or CREATEDATE or SAVEDATE or PRINTDATE? See my page on the different date fields in Word.

    http://addbalance.com/word/datefields1.htm

    What is it you want to replace them with?

    This forum is a user-to-user support forum. I am a fellow user.

    I hope this information helps.

    Please let me know if you have any more questions or require further help.

    You can ask for more help by replying to this post (Reply button below).

    Stay well
  7. User Advert


    Hi,

    willkommen im Windows Forum!
Thema:

WORD MACRO: Search for date fields and replace result - Microsoft Office

Die Seite wird geladen...

WORD MACRO: Search for date fields and replace result - Similar Threads - WORD MACRO Search

Forum Datum

Excel VBA: Replace/convert date fields in header and footer to sample text

Excel VBA: Replace/convert date fields in header and footer to sample text: I need an excel macro to replace all date fields in the header and footer to a sample text like "here was a date" and unlink all other fields. I have a solution already for Word but I don't know...
Microsoft Office 30. Mai 2022

Bug report: SharePoint lists and search results of lists

Bug report: SharePoint lists and search results of lists: If a list in SharePoint online was edited, the search result does not actualize. Repro steps:1. Search for a list in SharePoint.2. Edit a list element and save the list.3. Search again for the...
Microsoft Office 25. April 2022

Word COMPARE Field delivers wrong result with specific values in DOCVARIABLE

Word COMPARE Field delivers wrong result with specific values in DOCVARIABLE: Hi,I'm encountering a strange behavior of the COMPARE field when it has to compare values in DOCVARIABLE fields.When the DOCVARIABLE field has a certain value, the COMPARE returns the wrong result...
Microsoft Office 11. Januar 2022

WORD macro unlink all fields. Problem with page numbers

WORD macro unlink all fields. Problem with page numbers: Hi I want to unlink all fields in a word document with a macro. It works with the following VBA code. But when I have page numbers multiple pages in a document the numbers will just show "1" on...
Microsoft Office 1. Dezember 2020

MS Word macro

MS Word macro: Hi there, I would like to write a WORD macro that sends words to an API parallel to typing. Is that possible? A similar mechanism could possibly underly the MS Word spell checker. Is there any...
Microsoft Office 14. September 2020

replace DTPicker for month.year

replace DTPicker for month.year: hi, i would like to replace an mscal.ocx-mscomct2.ocx active-x control for selection of month/year as shown in the gifs. [IMG] [IMG] is it possible to do this with a standart text-input...
Microsoft Office 14. Februar 2018

SharePoint-Online search Results not showing

SharePoint-Online search Results not showing: Hey, searches in the SharePoint App just show "problem displaying results" since a week, while searches on our homepage-website work perfecly. I can´t think of a reason why SharePoint has...
Microsoft Office 18. September 2017
WORD MACRO: Search for date fields and replace result solved
  1. Diese Seite verwendet Cookies, um Inhalte zu personalisieren, diese deiner Erfahrung anzupassen und dich nach der Registrierung angemeldet zu halten.
    Auf dieser Website werden Cookies für die Zugriffsanalyse und Anzeigenmessung verwendet.
    Wenn du dich weiterhin auf dieser Seite aufhältst, akzeptierst du unseren Einsatz von Cookies.