Updated macro at the end
Noothing extra is needed; just open vnt file in word in MSword.
Then through MsWord menu "Tools" - go to section "Macros"
then record macro. Do anything like pressing arrow key.
Then stop the recording. Use Alt F8 key combination and edit
created macro; the way it looks on MsWord97 is
like:
"
Sub VNT_TO_txt()
'
' VNT_TO_txt Makro
' Makro zapisane 12-07-26 przez Wojciech Olkowski
'
Selection.HomeKey Unit:=wdStory
Selection.Find.Execute Replace:=wdReplaceAll
ActiveWindow.ActivePane.View.ShowAll = True
Selection.Find.ClearFormatting
With Selection.Find
.Text = "QUOTED-PRINTABLE:"
.Replacement.Text = ";"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.HomeKey Unit:=wdStory, Extend:=wdExtend
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.Find.ClearFormatting
With Selection.Find
.Text = "DCREATED:"
.Replacement.Text = ";"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.EndKey Unit:=wdStory, Extend:=wdExtend
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "=^p"
.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.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "=0D=0A"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
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.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "=20"
.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
ActiveWindow.ActivePane.View.ShowAll = False
End Sub
"; of course without the quotation marks at the beginning and at end.
Now is to run the macro at opened vnt file and confirm all replacements
by "OK" button at dialog boxes. It should DO!!
:banghead:Today I put updated macro below
No more annoying dialog boxes!
The whole is below so just copy it without the quotation marks at the beginning and at end.
"
Dim myRangeVNT_TO_txt As Variant
Sub VNT_TO_txt()
Set myRangeVNT_TO_txt = ActiveDocument.Content
'
' VNT_TO_txt Makro
' Makro zapisane 12-07-26 przez Wojciech Olkowski
'
Selection.HomeKey Unit:=wdStory
ActiveWindow.ActivePane.View.ShowAll = True
Selection.Find.ClearFormatting
With Selection.Find
.Text = "QUOTED-PRINTABLE:"
.Replacement.Text = ";"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.HomeKey Unit:=wdStory, Extend:=wdExtend
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
.Text = "DCREATED:"
.Replacement.Text = ";"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.EndKey Unit:=wdStory, Extend:=wdExtend
Selection.Delete Unit:=wdCharacter, Count:=1
myRangeVNT_TO_txt.Find.Execute FindText:="=^p", ReplaceWith:="", _
Replace:=wdReplaceAll
myRangeVNT_TO_txt.Find.Execute FindText:="=0D=0A", ReplaceWith:="^p", _
Replace:=wdReplaceAll
myRangeVNT_TO_txt.Find.Execute FindText:="\;", ReplaceWith:=";", _
Replace:=wdReplaceAll
myRangeVNT_TO_txt.Find.Execute FindText:="=20", ReplaceWith:=" ", _
Replace:=wdReplaceAll
ActiveWindow.ActivePane.View.ShowAll = False
End Sub
"
That is all the problem of course it does not convert special characters.