-
Topic
-
We have an applet that inserts a block of text (as a bolded header) into every message on the SEND event. Occassionally, instead of inserting the text at the top of the message as expected, it will insert it in the middle. This occurs randomly and infrequently and is a terrible nuisance as this header is used to ID and filter our mail through our systems.
For the past year we have been having this problem and we’ve tried several tactics to ensure that the text is always inserted in the message body of the active view, at the TOP of each message (please see the code sample below). I’ve spoken to Advansys support and no one seems to have heard of this happening to anyone else.
We are using Formativ 1.6 and are in the process of upgrading to Formativ 2.0. I realize this could be a bug within the runtime or the language itself, but I would appreciate it if someone verified our code and gave us some advice on how to make absolutely sure that we’re doing everything we can to avoid this problem.
Thanks for your help.
<<SAMPLE CODE>>
headerText = “This is the header text to be inserted at the top of each message”query = true
counter = 0Do
Utilities.DoEvents ‘<— COULD DOEVENTS BE CAUSING CONFLICTS?
If Groupwise.EnvCurrentViewName() = “Mail” or Groupwise.EnvCurrentViewName() = “Message” _
or Groupwise.EnvCurrentViewName() = “Meeting” or Groupwise.EnvCurrentViewName() = “Reunion” _
or Groupwise.EnvCurrentViewName() = “Task” or Groupwise.EnvCurrentViewName() = “Tache” _
or Groupwise.EnvCurrentViewName() = “Phone Message” or Groupwise.EnvCurrentViewName() = “Message telephonique” _
or Groupwise.EnvCurrentViewName() = “Mail (simple)” or Groupwise.EnvCurrentViewName() = “Message (simple)” _
or Groupwise.EnvCurrentViewName() = “Reminder” or Groupwise.EnvCurrentViewName() = “Note” ThenCall Groupwise.focusSet(fcsMessage, “”)
Call Groupwise.PosTextTop()
Call Groupwise.fontbold(true)
Call Groupwise.TypeText(headerText)
Call Groupwise.fontbold(false)query = false
Exit Do
Else
query = true
End If
counter = counter + 1
Loop Until query = false Or counter > 20
If query = true Then
MsgBox “Error: PA Macro Line 271 – Query focus timed out! Message will be sent without header.”
End If
- You must be logged in to reply to this topic.