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.
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:
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.