V
Vince
This is a little confusing.
Example input:
Old Mcdonald had a farm. <Text> This text cannot be guessed </Text> Eaeieio
What's desired:
I should be able to turn the text within the "<Text>" tag to (a) Proper
Case (b) Only the first initial capital (c) Lower Case (d) Upper Case (e)
Small capitals.
What I've done:
(d) and (e) are very simple:
With ActiveDocument.Range.Find
.ClearFormatting
.MatchWildcards = True
.text = "\<Text\>" & "[!^l^13]@" & "\</Text\>"
with .replacement
.text ="^&"
.font.allcaps=True ' For (d)
.font.Smallcaps=True ' For (e)
End With
.Execute Replace:=wdReplaceAll
End With
This works fine for (d) and (e). But, what can I do about (a), (b) and (c)?
I know that VB has a function VbStrConv(String,VbLowerCase) and so forth but
I cannot use them because I do not know the content of the Find string.
Therefore, if I do a:
.text =strconv("^&",vbuppercase) ' This is meaningless as ^& is
considered to be the text
What should I do?
Thank you for your time.
Vince
Example input:
Old Mcdonald had a farm. <Text> This text cannot be guessed </Text> Eaeieio
What's desired:
I should be able to turn the text within the "<Text>" tag to (a) Proper
Case (b) Only the first initial capital (c) Lower Case (d) Upper Case (e)
Small capitals.
What I've done:
(d) and (e) are very simple:
With ActiveDocument.Range.Find
.ClearFormatting
.MatchWildcards = True
.text = "\<Text\>" & "[!^l^13]@" & "\</Text\>"
with .replacement
.text ="^&"
.font.allcaps=True ' For (d)
.font.Smallcaps=True ' For (e)
End With
.Execute Replace:=wdReplaceAll
End With
This works fine for (d) and (e). But, what can I do about (a), (b) and (c)?
I know that VB has a function VbStrConv(String,VbLowerCase) and so forth but
I cannot use them because I do not know the content of the Find string.
Therefore, if I do a:
.text =strconv("^&",vbuppercase) ' This is meaningless as ^& is
considered to be the text
What should I do?
Thank you for your time.
Vince