Append Table in Rich Text Item field

Hi All, I have a button in a form.All I want is that a new document should be created at the click of the button and in the new document there should be a table added to the rich text field.Also the document should be in edit mode so that i can enter some text in the table and save it.

PLease Help!

Thanks in advance!

Subject: Append Table in Rich Text Item field

The easiest way to do this is to have a profile document (named “MasterProfile”, let’s say) with a rich text field (let’s call it “EmptyTable”) where you create your empty table. Then in the default value of the rich text field on the form you will compose, enter the following formula:

@GetProfileField(“MasterProfile”; “EmptyTable”)

Subject: RE: Append Table in Rich Text Item field

What if i want to paste a table in rich text field… in my code is is not displaying once saved as draft

Subject: Append Table in Rich Text Item field

You can dynamically create a new table using LotusScript, but it’s easier to “paste” an empty pre-created table from another document. You simply first manually create a dummy document with a richtext field and manually create a table in it. Then you can re-use that table in your code by getting handle to the dummy document and appending the whole richtext item containing the table to the new document. After that you save the new document and open it in edit mode using “uiworkspace.EditDocument” method. If noone else shares their code with you, I’ll give you a simple code example later.

/Andrei

http://dominounlimited.blogspot.com/

Subject: RE: Append Table in Rich Text Item field

Thanks Andrei.I think your logic should work.I am trying it right now. However it would be great if you could give me the code as well.