R
Ronald van Zantvoort
Hi all,
At some point in the Word 2000 macros I've inherited a string
(RP.strStatPlaats) is called from the database.
This has a format like (for example)
Capelle aan de IJssel, gemeente Capelle aan de Rijn
If there is a ", gemeente" in the string, it needs to bold and underline
everything untill the ,
the rest should be normal text. If not, the entire string should be bold
and underlined.
So here's where I am:
If InStr(RP.strStatPlaats, ", gemeente", vbTextCompare) > 1 Then
Selection.Font.Underline = True
Selection.Font.Bold = True
Selection.TypeText Text:=Left(RP.strStatPlaats, ???)
Selection.Font.Underline = False
Selection.Font.Bold = False
Selection.TypeText Text:=Right(RP.strStatPlaats, ???)
Else
Selection.Font.Underline = True
Selection.Font.Bold = True
Selection.TypeText Text:=RP.strStatPlaats
Selection.Font.Underline = False
Selection.Font.Bold = False
End If
Could someone please fill me in on the ???s?
Thanks loads in advance!
Ronald van Zantvoort
At some point in the Word 2000 macros I've inherited a string
(RP.strStatPlaats) is called from the database.
This has a format like (for example)
Capelle aan de IJssel, gemeente Capelle aan de Rijn
If there is a ", gemeente" in the string, it needs to bold and underline
everything untill the ,
the rest should be normal text. If not, the entire string should be bold
and underlined.
So here's where I am:
If InStr(RP.strStatPlaats, ", gemeente", vbTextCompare) > 1 Then
Selection.Font.Underline = True
Selection.Font.Bold = True
Selection.TypeText Text:=Left(RP.strStatPlaats, ???)
Selection.Font.Underline = False
Selection.Font.Bold = False
Selection.TypeText Text:=Right(RP.strStatPlaats, ???)
Else
Selection.Font.Underline = True
Selection.Font.Bold = True
Selection.TypeText Text:=RP.strStatPlaats
Selection.Font.Underline = False
Selection.Font.Bold = False
End If
Could someone please fill me in on the ???s?
Thanks loads in advance!
Ronald van Zantvoort