Consulting

Results 1 to 2 of 2

Thread: Replace texts with non-latin charaters using "Find all word forms"

  1. #1

    Replace texts with non-latin charaters using "Find all word forms"

    Hi all, I'm having a problem with a search & replace macro.

    I use "Find all word forms" option to search for all conjugations of the word "sleep" (slept, sleeps, sleeping, sleep) and replace them with "ngủ" (the translation for them in Vietnamese).

    The problem is the character "ủ" isn't recognized as part of the latin alphabet, and all forms of "sleep" was replaced with "ng?".

    I'm currently forced to replace "sleep" with "ajsdhra", and have a separate search function to replace all "ajsdhra" with "ngủ". This doubles the time needed for the macro to work, and it takes over an hour to finish (it's supposed to replace many other words aside from "sleep").

    Is there anyway to force "Find all word forms" accept non-latin characters as replacement?

    P/S: I cross-posted this on Stackoverflow: https://stackoverflow.com/questions/...-in-ms-word-20
    Last edited by vkhu; 01-13-2018 at 10:15 AM.

  2. #2
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    You are correct that the 'MatchAllWordForms = True' doesn't work with replacements like ngủ. However, you should be able to use ngủ, followed by a replacement of ng? with ngủ (with 'MatchAllWordForms = False').
    It seems
    unlikely that one change would double the processing time for your whole macro. That said, there may be other ways to optimize your code but, without seeing it, we can't really give specific advice.

    PS: Kindly update your Stackoverflow post to alert them to the cross-post here.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •