/ Forums / Advansys Formativ / Creating Solutions with Formativ / Formatting and Positioning Output Text / Reply To: Formatting and Positioning Output Text

#7013
Support 1a
Participant

Isabelle,

You can use the standand VB constant ‘vbcrlf’ to insert a CR/LF pair in a string. You’ll find this constant (and some others) documented in the VBS help file.

Here’s some examples of using this technique. They vary based on whether you are working with plain text or HTML messages.

Plain Text:

headerText = variable1 & vbcrlf & variable2 & vbcrlf
Utilities.ToClipBoard(headerText)
call GroupWise.FocusSet(fcsMessage, "") 
GroupWise.EditPaste

HTML:

headerText = variable1 & "<BR>" & variable2 & "<BR>"
Utilities.CopyHTMLToClipboard(headerText)
call GroupWise.FocusSet(fcsMessage, "") 
GroupWise.EditPaste

In terms of querying the focus, I’m afraid I’ve accidentally misled you. I was thinking of querying the current view or window. Unfortunately, GroupWise does not provide a means by which you can query control focus. Please accept my apologies. What you could try is something like this:

if GroupWise.EnvCurrentViewName() = "Mail" then
   call GroupWise.FocusSet(fcsMessage, "")
else
   MsgBox "The mail view is not active - FocusSet will not work just yet."
end if

Without knowing the exact context in which you are accessing the body (I would need to see the applet), this is the general approach you can use, i.e. check that the view is active (and possibly activate it) prior to attempting to call any FocusSet() methods.

I hope this helps.

Advansys Support

[This message was edited by Support 3 on September 07, 2004 at 04:58 PM.]