250 likes | 901 Views
Email Mail Merge for Lotus Notes and Excel User Guide. Author: Gavin Bollard, 19 May 2011 Reviewed: David Turner, 28 Oct 2011, for release 1.3 MailMerge Excel to Notes Project (OpenNTF). Contents. Part 1: Creating the Mail Merge Part 2: Sending the Merge Files.
E N D
Email Mail MergeforLotus Notes and ExcelUser Guide Author: Gavin Bollard, 19 May 2011 Reviewed: David Turner, 28 Oct 2011, for release 1.3 MailMerge Excel to Notes Project (OpenNTF)
Contents • Part 1: Creating the Mail Merge • Part 2: Sending the Merge Files
Part 1: Creating the Mail Merge • To do a merge, you’ll need; • A Lotus Notes email template (draft). • An Excel spreadsheet containing merge data. Based on the email template, the Create Mail Merge script will draft new email documents for each data row in the chosen Excel spreadsheet. All standard email fields, body, attachments and styling will be copied from the template to the new drafted email documents.
Creating the Email Template • In Lotus Notes, create a new Mail Memo to use as a Mail Merge Template. • Leave the Address details blank but you can put a Subject in to easily identify it. • The Subject will be overwritten assuming this is provided in the spreadsheet (recommended). • In the email body, type a search-replace ‘token’ in uppercase and square brackets (e.g. [SURNAME]) whenever you want to include a field from your spreadsheet. • When finished, click Save as Draft.
1. Sample email template including a range of ‘tokens’ to replace in the email body. Tokens are typed in square brackets and uppercase (e.g. [SURNAME]). 2. Include any delivery options, flags, or additional mail options, and set any other email fields you want to copy to new drafts.Don’t include any recipient addresses. Addresses and the Subject and other standard email fields will be overwritten if you provide them in the spreadsheet. 3. Save as Draft only. 3. 2. 1.
Creating the Spreadsheet • Start Excel and create a spreadsheet of data with a header row. • Ensure the header row and first column of the spreadsheet do not contain any blank cells. • To customise email documents for each recipient, include the recommended special headers: • To – SendTo email address field • Subject – Subject email field • Cell values under any of the special headers will overwrite the standard email fields.
Creating the Spreadsheet • Optionally include any other specially supported headers mapped to email fields: • Cc – CopyTo email address field • Bcc – BlindCopyTo email address field • Reply To – ReplyTo address • Attachments – Filenames to attach to the top of the email • Attachment files must exist and be readable on file system or a warning will be raised. A file list can be pipe-separated (|), and it supports wildcards (*). • And add any extra columns of data you want to include in your email body text. • Use any Excel cell formatting (e.g. percentages, dates, currency), but cell fonts, styles, or colours are not copied. You can also use cell formulas. • Save your spreadsheet.
1. 2. 1. Sample spreadsheet includes ‘To’, ‘Subject’ and ‘Attachments’ special headers. Plus a range of custom headers. 2. Includes data relating to each email recipient. 3. Also showing sample files to be attached. 3.
Creating the Merged Emails • Open your drafts folder and select (click on without opening) your new email. • From the Notes Menu, select; • Actions, Mail Merge, Create Mail Merge
Create Merge - Intro • A dialog will be displayed, identifying the draft email template you selected, release number and a brief User Guide. • Click OK.
Create Merge - Spreadsheet • Select your Mail Merge Excel spreadsheet file. • Click OK.
Create Merge - Validation • The script will validate the email template against the spreadsheet to identify any missing tokens or headers. You will be warned about any missing tokens. • It confirms the number of draft email documents which will be generated (corresponding to records in the spreadsheet). • Note the provided Batch ID, you will need this to send the emails as a batch later. • If all looks as it should. Click OK again to begin generating files.
Create Merge - Progress • The mail merge operation will then go and create draft emails. The Notes status bar will update as it proceeds. • Any errors or warnings will be displayed in a dialog. For example, this one relating to an attachment file which could not be found. • An Error prevents a draft from being saved, continuing from the next draft in the batch. A Warning will continue the draft and batch. • If required, your Notes Administrator can assist by viewing the agent log in your mailbox.
Create Merge - Complete • The mail merge operation will complete and show a summary processing status, with a reminder of the batch ID number. • You will then want to validate the drafted emails.
View Your Drafts • Your drafts should appear in the drafts folder. • You can view, edit, delete or send them just like normal email.
Check an Email or Two • Be sure to do a few checks before sending your emails. • You’ll see that your fields have been filled in.
Check an Email or Two • Be sure to do a few checks before sending your emails. • You’ll see that your fields have been filled in. • If specified, multiple attachments are appended at the top in a collapsible section.
Part 2: Sending the Merge Files • You don’t actually have to do this part. • You can send your drafts individually, just like normal emails. • But it’s easier to send in a batch. • You can choose to either: • A: send all drafts, or • B: only selected drafts.
A: Send All Process • From the Notes Menu, select, • Actions, Mail Merge, Send Mail Merge.
B: Send Selected Process • In your Drafts folder, select the mails you want to send (or you can select all). • Drafts which don’t contain the merge ID won’t be sent. • From the Notes Menu, select, • Actions, Mail Merge, Send Selected Mail Merge.
Send Mail - Enter Batch ID • The merge will prompt you for the ID number you wrote down earlier. • It will usually guess it right based on your selection or the previously created batch.
Send Mail - Confirmation • The last dialog will be displayed telling you how many emails it found with the Batch ID you used. • If you are ready to send the emails. Click Ok.
Send Mail - Completed • Similar to the Create process, the status bar will refresh as sending proceeds. • At the end of the process, a final dialog will confirm how many were sent and whether there were any errors. • Click Ok when done. • Successfully sent docs willmove from Drafts, into theSent folder.
What it Looks Like • It looks better through Lotus Notes clients, but otherwise just looks like a normal email. • Here’s my Gmail test.
Credits • A big thank you to: • David Turner and Sacha Chua for developing such a great utility. • Niklas Heidloff and others on the OpenNTF team for supporting and hosting this project. • Gavin Bollard for initially writing this User Guide. • Thanks those that rate, review and leave feedback on this project! • MailMerge Excel to Notes (OpenNTF)