SetTargetFrame crashes Notes

I have the code________________________________

Call workspace.SetTargetFrame(“Content”)

Set uidoc = workspace.EditDocument(False, doc, False, , False)

Call workspace.SetTargetFrame(“Outline”)

Call workspace.OpenPage(“pgOutline”)


It’s call from QueryOpenDocument is a view embedded to a form. The form is display on the frame “Content”. This code will crash Notes when click on the document in the view.

The code runs fine if directly from the view in ‘Content’ frame. If embedded in the form, Notes will crash.

Any clue to why this happen and how to overcome it

Thanks in advance

William