Hier für alle, die ebenso tippfaul sind wie ich, ein Makro, das die Wordbearbeitung der MKR-Dateien fast vollständig (bis auf das richtige Speichern und Einfügen der ersten Zeile) übernimmt:
Sub Markerdaten() |
|
Rem =====================================================
Rem Hier wird an Pos 1 gesprungen, und die Tabelle in Text umgewandelt.
Rem =====================================================
|
|
Selection.HomeKey Unit:=wdStory
Selection.Rows.ConvertToText Separator:=wdSeparateByTabs, NestedTables:=True
|
Rem =====================================================
Rem Suche nach dem Wort "Marker+TAB" und umwandeln in "Marker ( ".
Rem =====================================================
|
|
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find |
|
|
.Text = "Marker^t"
.Replacement.Text = "Marker ( "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False |
|
End With |
Rem =====================================================
Rem Suche nach "TAB+2+ABSATZ" und umwandeln in " 2 )+Absatz".
Rem =====================================================
|
|
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find |
|
|
.Text = "^t2^p"
.Replacement.Text = " 2 )^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False |
|
End With |
Rem =====================================================
Rem Wie vor, jedoch diesmal mit der Ziffer "1".
Rem =====================================================
|
|
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find |
|
|
.Text = "^t1^p"
.Replacement.Text = " 1 )^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False |
|
|
Rem =====================================================
Rem Wie vor, jedoch diesmal mit der Ziffer "0".
Rem =====================================================
|
|
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find |
|
|
.Text = "^t0^p"
.Replacement.Text = " 0 )^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False |
|
End With |
Rem =====================================================
Rem Restliche Tabulatoren werden in Leerzeichen umgewandelt.
Rem ===================================================== |
|
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find |
|
|
.Text = "^t"
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False |
|
End With |
|
Selection.Find.Execute Replace:=wdReplaceAll |
End Sub |