Programatically Embed Ocx File

Hi All, How do i programatically embed a OCX control in a RTF field i have tried using NotesEmbedObject class but its not working.i need to embedd the the controls within the OCX file(ie if there is a button that displays HELLO WORLD inside the OCX file)i need to programatically do this operation how can this be done.

Please Help me in this regard!!!

Thanks In Advance

Subject: Programatically Embed Ocx File

This way

Dim rt As NotesRichTextItem

Dim obj As NotesEmbeddedObject

Set rt = New NotesRichTextItem(yourdoc, “yourRTDocField”)

Set obj = rt.EmbedObject(EMBED_OBJECT, “”, “yourOCXfile_fullpath with name”)

save your document

Subject: Programatically Embed Ocx File

Hello Ananth,

You can embed OCX into a rich Text field. See following code snippet…

Sub Postopen(Source As Notesuidocument)

Source.EditMode = True

Call Source.GoToField("Body")

If source.IsNewDoc Then

	Set Excel = Source.CreateObject("Excel", "OWC10.SpreadSheet.10")

Else

	Set Excel = Source.GetObject ("Excel")

End If

Hope this helps…

Best Regards,

Munish Kaushik