Q

Document creation

I have a requirement to copy stationery into a mail message, email this message and then, via a button, automatically copy the stationary attachments into the person's stationery folder. I can find code related to some aspects of what I am trying to do but they are all related to documents. Can you help please?
The stationery is a document. The code samples you have will probably work just fine.

If I understand your question correctly: you have stationery in your mail file, and you'd like to somehow turn it into a file. Then you want to mail the file to someone as an attachment in an e-mail message. The e-mail message also contains a button that they would click to install the stationery into their own mail file. Is that correct?

You can do this -- there are a couple of ways. The easiest way to take a Notes document and package it for shipment is via the NotesDXLExporter. Convert the document to DXL and store that in a file. Then, in your button code, extract the file attachment to a file in the user's temp directory and use the NotesDXLImporter to create a new Notes document out of it. Since the stationery document contains a username in some fields, you will also want to modify the document and change your name to the name of the user who pressed the button. Since the stationery folder is really a view, you don't have to do anything special to get the new stationery to appear in that view -- if it has the right field values it will be there automatically.

Choice 2, if you prefer not to use a file, is to place the DXL into a hidden non-summary field in the memo. This information would not be visible to the user, but a button in the body field of the memo could read the text from it and process it using the NotesDXLImporter.

Another way is to just write button code to automatically create the document you want by coding values for all the fields. This tool will take a stationery document in your mail file and automatically generate the code you would need to duplicate it. However, it doesn't write the code for rich text, and not all rich text is possible to produce via LotusScript. So, you'd have to code that part yourself if it was possible at all.

Another possibility, if you can assume the users all have access to your network, is to store the stationery document in a database to which everyone has reader access. Then, you can write your button code to fetch it from that database and copy all the fields to a new document you create in the user's mail file, again modifying certain fields to contain the user's name instead of yours.

Do you have comments on this Ask the Expert question and response? Let us know.

This was first published in March 2005

Dig deeper on XML and Web Services for Lotus Notes Domino

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchDataCenter

SearchExchange

SearchContentManagement

Close