S
Sarunas
Hello,
I'm stuck with a problem. I have word 2000. For changing quotes in my
text to the ones used in my native language I wrote a macro. I've
testet it on Word97, Word2002 and Word2003 and it works perfectly. But
in Word2000 it doesn't.
If I'm typing opening guote like this ,, I use command ALT+0132 to get
it. This command works. But if I use this type of command (^0132 ) in
macro or in usual Repalce dialog it somehow converts my quote to the
closing one (which code is ALT+0147).
In macro I'm not using this type of line (.Text = """"), but using the
code (.Text = ChrW(8220)) but it doesnot works.
Here the code:
'
' Change ChrW(8220) quote to Lithuaninan opening quote
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = ChrW(8220)
.Replacement.Text = "^0132"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
What is wrong here in word2000 when this piece of macro perfectly works
in every other version?
For closing quote (^0147) I'm using the second piece of macro
'
' Change ChrW(8221) quote to Lithuaninan closing quote
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = ChrW(8221)
.Replacement.Text = "^0147"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Thanks for any suggestions.
I'm stuck with a problem. I have word 2000. For changing quotes in my
text to the ones used in my native language I wrote a macro. I've
testet it on Word97, Word2002 and Word2003 and it works perfectly. But
in Word2000 it doesn't.
If I'm typing opening guote like this ,, I use command ALT+0132 to get
it. This command works. But if I use this type of command (^0132 ) in
macro or in usual Repalce dialog it somehow converts my quote to the
closing one (which code is ALT+0147).
In macro I'm not using this type of line (.Text = """"), but using the
code (.Text = ChrW(8220)) but it doesnot works.
Here the code:
'
' Change ChrW(8220) quote to Lithuaninan opening quote
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = ChrW(8220)
.Replacement.Text = "^0132"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
What is wrong here in word2000 when this piece of macro perfectly works
in every other version?
For closing quote (^0147) I'm using the second piece of macro
'
' Change ChrW(8221) quote to Lithuaninan closing quote
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = ChrW(8221)
.Replacement.Text = "^0147"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Thanks for any suggestions.