operating_systems:microsoft:vsreplace
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
operating_systems:microsoft:vsreplace [2013/05/14 15:22] – sbolay | operating_systems:microsoft:vsreplace [2013/05/14 15:29] (current) – sbolay | ||
---|---|---|---|
Line 12: | Line 12: | ||
Dim FType As String | Dim FType As String | ||
Dim FName As String | Dim FName As String | ||
+ | | ||
+ | FType = " | ||
+ | FLocation = " | ||
| | ||
Dim colFiles As New Collection | Dim colFiles As New Collection | ||
- | RecursiveDir colFiles, | + | RecursiveDir colFiles, |
- | + | ||
- | FType = " | + | |
Dim vFile As Variant | Dim vFile As Variant | ||
Line 86: | Line 87: | ||
Dim myStoryRange As Range | Dim myStoryRange As Range | ||
+ | |||
+ | TFind_FR = " | ||
+ | TReplace_FR = " | ||
+ | |||
+ | TFind_DE = " | ||
+ | TReplace_DE = " | ||
'First search the main document using the Selection and replace french text | 'First search the main document using the Selection and replace french text | ||
With Selection.Find | With Selection.Find | ||
- | .Text = " | + | .Text = TFind_FR |
- | .Replacement.Text = " | + | .Replacement.Text = TReplace_FR |
.Forward = True | .Forward = True | ||
.Wrap = wdFindContinue | .Wrap = wdFindContinue | ||
Line 104: | Line 111: | ||
' | ' | ||
With Selection.Find | With Selection.Find | ||
- | .Text = " | + | .Text = TFind_DE |
- | .Replacement.Text = " | + | .Replacement.Text = TReplace_DE |
.Forward = True | .Forward = True | ||
.Wrap = wdFindContinue | .Wrap = wdFindContinue | ||
Line 121: | Line 128: | ||
If myStoryRange.StoryType <> wdMainTextStory Then | If myStoryRange.StoryType <> wdMainTextStory Then | ||
With myStoryRange.Find | With myStoryRange.Find | ||
- | .Text = " | + | .Text = TFind_FR |
- | .Replacement.Text = " | + | .Replacement.Text = TReplace_FR |
.Wrap = wdFindContinue | .Wrap = wdFindContinue | ||
.Execute Replace: | .Execute Replace: | ||
End With | End With | ||
With myStoryRange.Find | With myStoryRange.Find | ||
- | .Text = " | + | .Text = TFind_DE |
- | .Replacement.Text = " | + | .Replacement.Text = TReplace_DE |
.Wrap = wdFindContinue | .Wrap = wdFindContinue | ||
.Execute Replace: | .Execute Replace: | ||
Line 135: | Line 142: | ||
Set myStoryRange = myStoryRange.NextStoryRange | Set myStoryRange = myStoryRange.NextStoryRange | ||
With myStoryRange.Find | With myStoryRange.Find | ||
- | .Text = " | + | .Text = TFind_FR |
- | .Replacement.Text = " | + | .Replacement.Text = TReplace_FR |
.Wrap = wdFindContinue | .Wrap = wdFindContinue | ||
.Execute Replace: | .Execute Replace: | ||
End With | End With | ||
With myStoryRange.Find | With myStoryRange.Find | ||
- | .Text = " | + | .Text = TFind_DE |
- | .Replacement.Text = " | + | .Replacement.Text = TReplace_DE |
.Wrap = wdFindContinue | .Wrap = wdFindContinue | ||
.Execute Replace: | .Execute Replace: |
operating_systems/microsoft/vsreplace.1368544974.txt.gz · Last modified: 2013/05/14 15:22 by sbolay