Quote:
Originally Posted by Kalü
The second macro cannot be done in your style because the find what text differs for bold, italic, underlined and highlighted - right?
|
Not at all. Exactly the same approach can be taken.
Code:
Sub aabFettKursivZieldok()
Application.ScreenUpdating = False
With ActiveDocument.Range.Find
.ClearFormatting
.Replacement.ClearFormatting
.Format = True
.Forward = True
.MatchWildcards = True
.Wrap = wdFindContinue
.Replacement.Text = "\1"
.Text = "°°°°(?@>)''''"
.Replacement.Font.Underline = True
.Execute Replace:=wdReplaceAll
.Replacement.ClearFormatting
.Text = "§§§(?@>)%%%%"
.Replacement.Highlight = True
.Execute Replace:=wdReplaceAll
.Replacement.ClearFormatting
.Text = "####(?@>)&&&&"
.Replacement.Font.Bold = True
.Execute Replace:=wdReplaceAll
.Replacement.ClearFormatting
.Text = "~~(?@>)+++"
.Replacement.Font.Italic = True
.Execute Replace:=wdReplaceAll
End With
Application.ScreenUpdating = True
End Sub
Quote:
Originally Posted by Kalü
I thought so too, but please hava alook at the following picture
...
I have no idea why it is doing this
|
I don't see anything in your post that evidences either your first macro or mine has been run in it (there's none of your prefix/suffix strings, for example).
Quote:
Originally Posted by Kalü
And I have an additional question: Is it possible to turn off hyphenation in the document by using a vba-command and integrate this command in the first macro?
|
All you need for that is:
ActiveDocument.AutoHyphenation = False