/ Forums / Advansys Formativ / Creating Solutions with Formativ / Double Quote Problem with ItemSetText / Reply To: Double Quote Problem with ItemSetText

#7521
rdryan
Participant

Thank you for your response. Here is the applet I’m using:

‘——————————————————————————-
‘ 3/1/06 rdr Created
‘ Allow email sender to insert a standard customer warning message on top of
‘ the composing message body to warn recipient not to send sensitive personal
‘ information via email
‘——————————————————————————-

Sub Main(Client, GWEvent)
Dim Msg
Dim textLine
Dim textMessage
Dim StrMsg
Dim StrNewMsg

textLine = “________________________________________________________”
textMessage = “For future reference, to protect the confidentiality of your”_
+ ” financial information, please do not include personal ” _
+ “information such as account numbers, card numbers, or ” _
+ “social security numbers in email messages. Regular email ” _
+ “messages are not secure and therefore should not be used ” _
+ “to communicate confidential information. “

Set Msg = GroupWise.ComposingItem

if (not Msg is Nothing) then
strNewMsg = textLine _
+ vbCRLF + vbCRLF + textMessage + vbCRLF _
+ textLine + vbCRLF + vbCRLF + Msg.BodyText
iSyntax = “ItemSetText(“”X00″”;10;””” & strNewMsg & “””;0;1)”
msgBox groupWise.throwToken(iSyntax, iReturnVal)
‘call GroupWise.ItemSetText(“X00”, itfMessage, strNewMsg, false)

Set Msg = nothing
else
MsgBox(“no gw items were available to insert text”)
end if

End Sub

You’re right that the test you describe above works well. In fact, I’m more puzzled now. For some reason though, if you type the (), {} within the message body, Msg.BodyText with throwToken’s iReturnVal comes back false and the applet fails.

Thanks for your ideas,
rdryan