Awesome, yes please help. Obviously, you're right, I don't have a text
string named Str1 and the code is inserted in the wrong place. But I don't
know how to "name" my text either. Case "Level 0" in the code below is as
far as I got in inserting the text into the macro but it is mostly in Cell(3)
which all of the long text, including paragraph marks, will reside. I didn't
include the other macros (PPCDim1, PPCD2, PPC4, 5, or 6), because they
actually don't break the 255 character limit and work fine, and even if they
do, with what you give me here I'll be able to apply there if needed. If I'm
counting characters right, Cell(4) will also throw the "StringTooLong"
run-time error.
Here's my code:
Sub PPCDim3()
'
' PPCDim3 Macro
' Macro created 1/23/2010 by Dax
'
ActiveDocument.Unprotect
!!! Run-time Error '424': Object required !!! -->
FmFld.Range.Fields(1).Result.Text = Str1
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
Dim ddresult As String
ddresult = Selection.FormFields(1).Result
Select Case ddresult
Case "Level 0"
For i = 2 To 4
Selection.Rows(1).Cells(2).Range.FormFields(1).Result = "Risk
Rating 0"
Selection.Rows(1).Cells(3).Range.FormFields(1).Result =
"Dangerousness/Lethality: Good impulse control and coping skills." & vbCr & _
"Interference with addiction recovery efforts: Emotional
concerns relate to negative consequences and effects of addiction. Able to
view these as part of addiction and recovery." & vbCr & _
"Social functioning: Relationships or spheres of social
functioning are being impaired but not endangered by patient's substance use.
Able to meet personal responsibilities and maintain stable meaningful
relationships despite the mild symptoms experienced." & vbCr & _
"Ability for self-care: Adequate resources and skills to
cope with emotional and behavioral problems." & vbCr & _
"Course of illness: Mild to moderate signs and symptoms with
good response to treatment in the past. Any past serious problems have a
long period of stability or past problems are chronic but do not pose
high-risk vulnerability."
Selection.Rows(1).Cells(4).Range.FormFields(1).Result =
"Low-intensity mental health services needed to coordinate medication and
case management services corrdinated with addiction and mental health
psycoeducation. Level I outpatient services that incorporates specific
services for dual diagnosis patients as well as chemical dependency only
patients and mental health only patients."
Next i
Case "Level 1"
For i = 2 To 4
Selection.Rows(1).Cells(2).Range.FormFields(1).Result = "Risk
Rating 1"
Selection.Rows(1).Cells(3).Range.FormFields(1).Result = "Long
string goes here."
Selection.Rows(1).Cells(4).Range.FormFields(1).Result = "Result
for Level 1 in Column 4"
Next i
Case "Level 2"
For i = 2 To 4
Selection.Rows(1).Cells(2).Range.FormFields(1).Result = "Risk
Rating 2"
Selection.Rows(1).Cells(3).Range.FormFields(1).Result = "Long
string goes here."
Selection.Rows(1).Cells(4).Range.FormFields(1).Result = "Result
for Level 2 in Column 4"
Next i
Case "Level 3"
For i = 2 To 4
Selection.Rows(1).Cells(2).Range.FormFields(1).Result = "Risk
Rating 3"
Selection.Rows(1).Cells(3).Range.FormFields(1).Result = "Long
string goes here."
Selection.Rows(1).Cells(4).Range.FormFields(1).Result = "Result
for Level 3 in Column 4"
Next i
Case "Level 4"
For i = 2 To 4
Selection.Rows(1).Cells(2).Range.FormFields(1).Result = "Risk
Rating 4"
Selection.Rows(1).Cells(3).Range.FormFields(1).Result = "Long
string goes here."
Selection.Rows(1).Cells(4).Range.FormFields(1).Result = "Result
for Level 4 in Column 4"
Next i
End Select
End Sub
I hope that's enough help for you to help me. I really appreciate it.
Thank you SO MUCH!
--Dax