When composing a new document, it can inherit field values from the open or selected document.
Is it possible, one way or the other, to inherit values of programmaticly fetched document?
in other words : when I have a NotesDocument (let say ‘doc’) in LotusScript, can I compose a new document that inherits from doc?
Subject: Compose new documents programmaticly
If you create a collection and start with the first doc you can use the ws.ComposeDocument method within a loop (if necessary) to create a new doc that will inherit values (if it’s designed to do so) from the doc in the collection.
If you do this I suggest you use the uidoc.Close (True) method to avoid the “Too many windows” issue.
HTH
Ian
Subject: I Should Have Added…
…you would need to do this through the ui.
Subject: Yes, this is a good solution
If I want to compose ‘newdoc’ that inherits from ‘basedoc’, I can do the following :
set uiBaseDoc=workspace.EditDocument(false,BaseDoc)
set uiNewDoc=workspace.ComposeDocument(“”,“”,“FormName”)
call uiBaseDoc.Close
it works fine, and I cannot see ‘BaseDoc’ opening and closing, as it’s too fast …
Thanks for you hint!
Regards,
Joris
Subject: RE: Compose new documents programmaticly
Great idea!
Subject: Compose new documents programmaticly
I don’t think it’s possible to inherit from a fetched document; however, with script, you can certainly get the values from the fetched document and add to the main document.
Subject: RE: Compose new documents programmaticly
Thanks Michael,
I do know how to work-around. I was just hoping that maybe I overlooked something and that there would be an easy way to do this, because it would make my application simpler.
Looks like I’ll have to pass the values in code.
Regards,
Joris