M
Mark
I am using Office XP.
Can someone please assist me with some code which with a case statement as
below picksup a value from another formfield and selects the appropriate text
file which is an address and places it in a formfield wrapping round the rows
of text?
I have tried various suggestions but to no avail!
Sub CrimeNo()
Dim strDivision As String
strDivision = Left(ActiveDocument.FormFields("CrimeNo").Result, 2)
Select Case strDivision
Case "EA"
'Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldIncludeText, _
'Text:="H:\\Victims Code\\EA.txt", PreserveFormatting:=False
'ActiveDocument.FormFields("Address").Select _
'Selection.TypeText Text:="H:\\Victims Code\\EA.txt"
'ActiveDocument.FormFields("Address").Select _
'Selection.Range.Text , Type:=wdFieldIncludeText, _
'Text:="H:\\Victims Code\\EA.txt", PreserveFormatting:=False
Case Else
End Select
Thanks
Can someone please assist me with some code which with a case statement as
below picksup a value from another formfield and selects the appropriate text
file which is an address and places it in a formfield wrapping round the rows
of text?
I have tried various suggestions but to no avail!
Sub CrimeNo()
Dim strDivision As String
strDivision = Left(ActiveDocument.FormFields("CrimeNo").Result, 2)
Select Case strDivision
Case "EA"
'Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldIncludeText, _
'Text:="H:\\Victims Code\\EA.txt", PreserveFormatting:=False
'ActiveDocument.FormFields("Address").Select _
'Selection.TypeText Text:="H:\\Victims Code\\EA.txt"
'ActiveDocument.FormFields("Address").Select _
'Selection.Range.Text , Type:=wdFieldIncludeText, _
'Text:="H:\\Victims Code\\EA.txt", PreserveFormatting:=False
Case Else
End Select
Thanks