OfficeCommunity.com
The official WordPerfect Office Community.

Macro - Hidden Text

rated by 0 users
This post has 3 Replies | 2 Followers

Not Ranked
Posts 2
Greg Spoo Posted: Mon, Jun 18 2012 12:42 PM

I think I've gotten my macro to work, but I'm not sure why what I did fixed the problem.

The macro searches for certain words to be replaced with an abbreviation. For example, it could replace the word payment with the abbreviation pmt. But in some cases I don't want the word to be selected at all. So I alter or lock the word with hidden text by inserting the phrase Lock_Word in the middle of the word payment. When the macro is searching for the word payment, I have hidden text displayed using the HiddenTextShowAll (On!) command so that the word payment is not found. But in the first instance of the locked word, even though the locked word displays as payLock_Wordment, the macro still selects the locked word, as if it was simply the word payment, and gives me the option of replacing the word.

The solution appears to be to also use the Display(On!) command. I've read the Help file about the description of this command. And I've used this command in the past, with a timing command, to display a macro so I can see the individual steps being executed. But in this case, I do not understand what the command is doing in my macro and why it appears to have fixed the problem. I'm not positive that the problem has been fixed, but I have done enough follow up testing that I am pretty sure that the Display(On!) command has fixed the problem.

Does any one know why the Display(On!) command might have fixed the problem?

Top 10 Contributor
Posts 646
lemoto replied on Tue, Jun 19 2012 1:06 PM

I do not.

I inserted Hidden "LockWord" into three different words, had the macro repeatedly search for the three words. With Show Hidden Text enabled, the numbers found were 4, 1, 4; with it disabled, the numbers were 5, 1, 5. Using Display(On!) or not made no difference.

Not Ranked
Posts 2
Greg Spoo replied on Wed, Jun 20 2012 6:46 PM

Thanks for checking and testing. I agree that it shouldn't make any difference. But it seems to make a difference. Something is obviously interacting with something else. So I'll have to keep looking for the needle in the haystack and try to figure it out.

Top 10 Contributor
Posts 646
lemoto replied on Thu, Jun 21 2012 8:07 AM

Sometimes Reveal Codes On/Off makes a difference. In this case,  I just tested and found none.

Page 1 of 1 (4 items) | RSS
© Corel Corporation. The content herein is in the form of a personal web log ("Blog") or forum posting. As such, the views expressed in this site are the views of the participants and do not necessarily reflect the views of Corel Corporation, or its affiliates and their respective officers, directors, employees and agents. Terms of use.