In (Globals) - (Optins)yourFormName add:
Use "wfNote"
and in the PostOpen event of your form add:
Sub Postopen(Source As Notesuidocument)
Dim wfName As String<br/>
On Error Goto errorHandling<br/>
wfName = "YourWorkflowName"<br/>
Call source.document.ReplaceItemValue( WF_FIELD_WORKFLOW, wfName )<br/>
Call source.document.ReplaceItemValue( WF_FIELD_ACTIVE_TASK, "" )<br/>
Call WorkflowInitiate( source.Document.GetItemValue(<br/>
WF_FIELD_WORKFLOW )(0), source.Document )
source.Refresh<br/>
Exit Sub<br/>
errorHandling:
Print "Error in Queryopen: " & Error$<br/>
Exit Sub<br/>
End Sub
where you replace wfName = "YourWorkflowName" with your workflow name, and Sub Postopen(Source As Notesuidocument) and End Sub are not included in the paste :)