How to avoid Message Popups in MS-WORD macros?
Thread poster: MikeTrans
MikeTrans
Germany
Local time: 22:55
Italian to German
+ ...
Jun 2, 2012

Hi,

I'm just trying to enhance my auto-write program. For that purpose I've recorded a macro in MS-WORD to glue words together like

here are glued words
here_are_glued_words

I've created a macro in order to just select a multi-word expression and press a shortcut. It works fine.
However, In the macro I have to carry out a search/replace and unfortunately when running the macro, the messages always comes

"Do you want to search to the end of the document? Press Yes - No"
or
"5 instances have been changed. Press OK"

Is there any method in a MS-WORD macro to impede those prompts? Or: how do I have to edit the macro to skip these prompts?

Here is the macro's code:

------------------------------------------------------------------------------------------------------------------
Sub Mike_Test()
'
' Mike_Test Makro
' Makro aufgezeichnet am 02.06.2012 von Mike xxxxxx
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = " "
.Replacement.Text = "_"
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Copy
Selection.MoveRight Unit:=wdCharacter, Count:=1
Application.Run MacroName:="Fusion.Protection.ProtectBackSpace"
Selection.TypeText Text:=" "
End Sub
--------------------------------------------------------------------------------------------------

Thanks very much any ideas,
Greets,
Mike


Direct link Reply with quote
 
MikeTrans
Germany
Local time: 22:55
Italian to German
+ ...
TOPIC STARTER
Got it!... Jun 2, 2012

The solution:
I must replace the "wdFindAsk" into "wdFindStop".
After some searching I found that in the Object Catalogue.

Greets,
Mike


Direct link Reply with quote
 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

How to avoid Message Popups in MS-WORD macros?

Advanced search






memoQ translator pro
Kilgray's memoQ is the world's fastest developing integrated localization & translation environment rendering you more productive and efficient.

With our advanced file filters, unlimited language and advanced file support, memoQ translator pro has been designed for translators and reviewers who work on their own, with other translators or in team-based translation projects.

More info »
Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search