WCM - Das österreichische Computer Magazin Forenübersicht
 

Zurück   WCM Forum > Rat & Tat > Software

Software Rat & Tat bei Softwareproblemen

Microsoft KARRIERECAMPUS

 
 
Themen-Optionen Ansicht
Alt 18.07.2004, 16:27   #10
Kasparov
Veteran
 
Registriert seit: 07.07.2002
Ort: Wien
Alter: 52
Beiträge: 251


Idee danke danke danke

@flinx:

hat zwar so nicht gefunkt, aber ohne deine Hilfe wär ich da in 1000 Jahren nicht draufgekommen. DANKE !!!!

Hab das mal geändert in:

Sub Schach()
ActiveDocument.Select
Selection.Find.ClearFormatting
With Selection.Find
.Text = "[R,Q,N,B]?[1-8]"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
While Selection.Find.Execute
Selection.Text = Replace(Selection.Text, "R", "T", 1, 1)
Selection.Text = Replace(Selection.Text, "Q", "D", 1, 1)
Selection.Text = Replace(Selection.Text, "N", "S", 1, 1)
Selection.Text = Replace(Selection.Text, "B", "L", 1, 1)
Wend
ActiveDocument.Select
Selection.Find.ClearFormatting
With Selection.Find
.Text = "[R,Q,N,B]??[1-8]"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
While Selection.Find.Execute
Selection.Text = Replace(Selection.Text, "R", "T", 1, 1)
Selection.Text = Replace(Selection.Text, "Q", "D", 1, 1)
Selection.Text = Replace(Selection.Text, "N", "S", 1, 1)
Selection.Text = Replace(Selection.Text, "B", "L", 1, 1)
Wend
End Sub


... und das funkt erstklassig!
Einziger Nachteil: es ist irre langsam - woran liegt das?
Und außerdem: kann man auch gleichzeitig nach zwei Texten suchen:
.Text = "[R,Q,N,B]?[1-8]" UND
.Text = "[R,Q,N,B]??[1-8]"
... ist ja sonst das gleiche. Oder brauch ich da die ganze Wurst ein zweites Mal?

Nochmals vielen Dank!!!
____________________________________
***************************************
Schnell muß er nicht sein, aber stabil!
Kasparov ist offline   Mit Zitat antworten
 


Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.

Gehe zu


Alle Zeitangaben in WEZ +2. Es ist jetzt 08:05 Uhr.


Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Forum SEO by Zoints
© 2009 FSL Verlag