(Note that as I prepare to post this message, I did another test to guarantee that I was able to duplicate the problem, and of course, it seems to work flawlessly. (Remember it fails to work only if the Japanese document is the first document you try it on during that Word session.) I prefer to avoid using the Selection object (the Range object is more graceful), but I’m prepared to switch to that, if necessary. I am attaching an edited version of the document here so that you can test it. I know that things that “usually” work or don’t work are the hardest to troubleshoot, but I was hoping that someone may have had a similar experience, and could perhaps steer me towards a solution or an explanation. BUT if I launch Word and then immediately open a document in English, it WILL work and if I then open the Japanese document (in the same Word session,) then it seems always to work in THAT document, too! It also seems to inevitably fail if I then try it on an English document during the same Word session. Yet if I launch Word and immediately open a document written by our Japanese partners, the code (almost inevitably) fails to work it can’t find the hidden text, let alone replace it. In the Word Options dialog box, open the Display tab and then under Printing options, check the Print hidden text option: Note: Sure, you always can change the formatting for a hidden text (to make. On the File tab, click the Options button: 2. I even cleared the formatting arguments, even though I understand that this is not (was not?) a “sticky” setting when using the Range object. To turn on or turn off the possibility to print a hidden text in a Word document, do the following: 1. Execute replacewith:=””, Replace:=wdReplaceAll If MsgBox(“Are you sure you want to remove all hidden Author Notes?”, vbQuestion + vbOKCancel, “Remove Author Notes”) = vbOK Then I tried using just the Find and then deleting the Found range, but the problem apparently is that it can’t FIND anything to delete! Here is the code: To remove the text, I wrote what would seem to be a VERY simply routine that I’ve used a thousand times. Both of them contain “author text,” which is text intended for the auhor’s edification but which should ultimately be removed. (I’m sure this will be like taking my car to the mechanic, but I’m going to give it a shot anyway!) We create a type of document in either English or Japanese. I seem to have a situation where the Edit/Find function won’t locate hidden text in (apparently) a particular document or kind of document.
0 Comments
Leave a Reply. |