SendToOutlook™
SendToOutlook is a Windows program that allows the creating of any type of Microsoft Outlook item, such as an email, meeting, appointment, contact, etc. through the use of a standard URL link inside a web page, as a desktop shortcut, or anywhere a URL link can be specified, such as an Intuit QuickBase Formula URL field.
SendToOutlook allows the creation of any type of Outlook item, and any Outlook field can be set via the link. There's even an option to save or send the item without ever showing the Outlook window.
- SendToOutlook URL Syntax
- SendToOutlook New Command
- New Command Parameters
- Notes on Setting Email Addressess
- Notes on Setting Attachments
- Overcoming Internet Explorer's URL Length Limitation
- SendToOutlook Variables Inside QuickBase File Attachments
- How Does SendToOutlook Work?
SendToOutlook URL Syntax
SendToOutlook:cmd?param1=value1...¶mN=valueN
Where cmd can be one of:
- New
- Open (not available yet)
For example:
SendToOutlook:New?ItemType=Meeting&Subject=Pricing
SendToOutlook New Command (Show me examples!)
Below is the general syntax of the New command. Most of the parameters are optional. Only ItemType is required. (The URL is shown across multiple lines, but like all URL's, it must be a single line in actual use.)
Syntax of URL for New Command:
SendToOutlook:New?ItemType=type
&Show=True or False
&ContinueOnError=True or False
&Folder=FolderPath
&EmbedImages=True or False
&IncludeSignature=True or False
&MultipleMessages=True or False
&DeleteFromSent=True or False
&TurnOffSendToQuickBase=True or False
&Picture=PicturePath
&OutlookFieldName1=value1
&OutlookFieldName2=value2
.
.
.
&OutlookFieldNameN=valueN
&STQBMappingRecordID=recordId
Click here to see examples using the New Command.
Parameters
- ItemType
- Show (Optional)
- ContinueOnError Optional)
- Folder (Optional)
- EmbedImages (Optional - Email Only)
- IncludeSignature (Optional - Email Only)
- MultipleMessages (Optional - Email Only)
- DeleteFromSent (Optional - Email Only)
- TurnOffSendToQuickBase (Optional - Email Only)
- Picture (Optional - Contact Only)
- OutlookFieldName (Optional)
- STQBMappingRecordID (Optional)
ItemType Parameter (Required)
The ItemType must be one of these values:
- Appointment
- Contact
- Meeting
- Note
- Post
- Task
Show Parameter (Optional)
If the Show parameter is False, then the Outlook item is not displayed, but instead is automatically saved in Outlook. If the Show parameter is not specified, or any value besides False, then the new Outlook item is displayed.
In the case of an Email Message, if it is not shown, it will be sent.
ContinueOnError Parameter (Optional)
If the ContinueOnError parameter is True, then if an error occurs while trying to set the value of a specified Outlook field, it is skipped, and no message is displayed. Most common cause for an error is a data type mismatch. For example, trying to set a value for a date or numeric that isn't valid.
If the ContinueOnError parameter is not specified, or any value besides True, then a message is displayed and the item is not created.
Folder Parameter (Optional)
You can specify which Outlook folder the item should be saved into. Simply include on the URL Folder=folderpath. For example, &Folder=Public Folders\Calendar to create a calendar item in the Public Folders Calendar.
If you do not specify this parameter, the Default Outlook folder is used, which is typically the desired location. For Exchange folders, the syntax would be something like this for a Calendar folder:
Mailbox - Username/Calendar/CalendarName.
EmbedImages Parameter (Optional - Email Only)
With an email message that contains links to image files (e.g. http://www.abc.com/hello.jpg), by default, Outlook removes the links and embeds the images into the email message before sending it. Using this parameter, you can control this Outlook behavior. If you prefer the link to remain, that is, don't embed the image, pass the parameter &EmbedImages=False. Note that Outlook 2003 has an option to control this behavior, but Microsoft removed that option starting with Outlook 2007.
If the EmbedImages parameter is not specified, or any value besides True, then images are not embedded.
IncludeSignature Parameter (Optional - Email Only)
If this is set to True, and your Outlook setting has a signature defined for new email messages, it is included in the message.
Note that if your Outlook setting is to create HTML messages, you should use the SendToOutlook parameter HTMLBody instead of Body to get the correct signature.
Also note that if you have more than one Outlook email account setup, your default account is always used to create the new email message. Therefore, the signature associated with your default account is used.
If the IncludeSignature parameter is not specified, or any value besides True, then the signature is not included.
MultipleMessages Parameter (Optional - Email Only)
If this is set to True, and the Show parameter is set to False, an individual email message for each recipient is created and sent instead of a single email message for everyone.
If the MultipleMessages parameter is not specified, or any value besides True, then a single email message is sent.
DeleteFromSent Parameter (Optional - Email Only)
If this is set to True, and the MultipeMessages parameter is set to True, after the email message has been sent by Outlook, it is deleted from the Sent Items folder.
If the DeleteFromSent parameter is not specified, or any value besides True, then messages are not deleted.
TurnOffSendToQuickBase Parameter (Optional - Email Only)
If this is set to True, and the MultipeMessages parameter is set to True, before an email message is sent, the SendToQuickBase option is set to "Do Not Send" to prevent any prompting to save or attempt to find a match.
If the TurnOffSendToQuickBase parameter is not specified, or any value besides True, then the current SendToQuickBase option is not altered while sending.
Picture Parameter (Optional - Contact Only)
Use this parameter to specify an image file for a Contact Picture. The value can be a local file, URL, or a QuickBase file attachment. For example, &Picture=http://www.SoftTechExperts.com/images/JoeAcunzoHeadshot.png. For details on the syntax of the value, see the Attachments section below.
OutlookFieldName Parameters (Optional)
OutlookFieldName is one of the many Outlook fields and value is any legal value for that field.
The name shown in Outlook is the OutlookFieldName, just with the spaces removed. For example, on a Contact the field for "Job title" is "JobTitle". However, there is at least one exception. The field displayed as "Priority" on a Task is actually the "Importance" field. Refer to the complete list of Outlook fields for details.
OutlookFieldName is not case sensitive. For example, &Subject=Pricing is the same as &SUBJECT=Pricing, or any combination.
Multiple pairs of OutlookFieldName=value may be included in the link, for example: &Subject=Discuss Pricing&Location=Phone Call.
If a value contains an ampersand, it must be URL encoded as %26. For example, if the Subject is "Review & Approve" it must be specified as "&Subject=Review %26 Approve".
The value can be a QuickBase File Attachment URL instead of just text. The content of the File Attachment is saved into the Outlook field. See the Attachments section for details on syntax of the URL. You can also have SendToOutlook variables substituted inside the content.
STQBMappingRecordID Parameter (Optional)
This parameter is only relevent when SendToOutlook is used in conjunction with SendToQuickBase. The recordId value is the Record ID# of a record within the SendToQuickBase Mapping Library Application. This indicates that this mapping should be used, if found within the user's available SendToQuickBase mappings, if SendToQuickBase is used to save the Outlook item into QuickBase. This prevents prompting for the mapping to be used at time of saving into QuickBase in the event the user has more than one mapping that saves that type of Outlook item. at time of saving into QuickBase in the event the user has more than one mapping that saves that type of Outlook item. For example, in the event there are two mappings that both save Meetings, one associated with a Lead record, and another with a Contact record, using this parameter you can specify which mapping to be used, and the prompting is avoided.
Notes on Setting Email Addresses
To set the email addresses on an Email message, Meeting or assignment of a Task, use the Outlook fields named To, CC and BCC.
For example:
&To=joe@example.com
These three fields accept multiple email addresses separated by a comma or semicolon. For example:
&To=joe@example.com;mary@example.com
Notes on Setting Attachments
To attach files to an email, task, contact, meeting, appointment, or post, use the Outlook field named Attachments. (Notice that's plural, with an s, even when specifying a single file.)
The file specified can be one of three types:
- local files on your hard drive (i.e. "c:\docs\report.doc")
- any URL (i.e. http://docs.abc.com/report.doc)
- QuickBase file attachment fields (see notes below)
No matter which type of file used above, or combinations as well, multiple files can be specified separated by commas, for example:
Attachments=c:\docs\report.doc,http://docs.abc.com/report.doc
Note that if a filename or URL has a comma in it, you must enclose it within double quotes. For example:
Attachments="c:\docs\Acme, Inc.doc",c:\docs\report.doc
QuickBase File Attachments
The QuickBase file attachment must use the the Intuit QuickBase documented syntax:
https://www.quickbase.com/up/DBID/a/rRID/eFID/vVID
where DBID is the table ID, RID is the Record ID in decimal of the record containing the file attachment, FID is the field identifier in decimal of the field containing the file attachment, and VID is the version identifier in decimal. Version 0 will always return the most recent version.
For example, to attach from table id bd5ghmxj5, Record ID 76, Field ID 36, the latest Version,
the URL would be:
https://www.quickbase.com/up/bd5ghmxj5/a/r76/e36/v0.
Here is a sample QuickBase Formula URL that attaches the latest version ("v0") of the QuickBase field with FID 36 ("e36") and sends the email message without showing it to the user ("Show=False"):
"SendToOutlook:New?ItemType=Email" &
"&Show=False" &
"&To=" & URLEncode([To]) &
"&Subject=" URLEncode([Subject]) &
"&Body=" & URLEndcode([Body]) &
"&Attachments=" & URLEncode("https://www.quickbase.com/up/" & Dbid() & "/a/r" & [Record ID#] & "/e36/v0;Project Report.doc")
The last part of that Attachments string ";Project Report.doc" is optional and allows specifying a meaningful name for the file attachment. Simply use a semicolon followed by a descriptive name.
Overcoming Internet Explorer's URL Length Limitation
Internet Explorer (IE) has a length limitation for a URL. SendToOutlook has a feature that can be used to overcome this limitation. Instead of invoking SendToOutlook with the actual command line, a QuickBase Formula Text field can be used to hold the command line instead. Then the actual SendToOutlook command passes the QuickBase Table ID, Record ID and Field ID.
NOTE: On the QuickBase Formula Text field you create, you cannot leave the Maximium Length set to zero. You must set it to a value that can hold the largest URL that could be constructed by your formula, such as 10000, or higher if necessary.
Here is an example. You could have a Formula Text field named "SendToOutlook Command" which has Field Id (rid) of 30, defined as follows (probably not shown on any form):
"SendToOutlook:New?ItemType=Contact" &
"&Show=True" &
"&ContinueOnError=True" &
"&Name=" & URLEncode([Name]) &
"&JobTitle=" & URLEncode([Title]) &
"&Phone=" & URLEncode([Phone]) &
"&Email1Address=" & URLEncode([Email]) &
"&Company=" & URLEncode([Related Account]) &
"&Street=" & URLEncode([Address]) &
"&City=" & URLEncode([City]) &
"&State=" & URLEncode([State]) &
"&PostalCode=" & URLEncode([Zip]) &
"&Country=" & URLEncode([Country]) &
"&WebPage=" & URLEncode([Account - Web]) &
"&Mobile=" & URLEncode([Mobile]) &
"&Body=" & URLEncode([Description]) &
"&Fax=" & URLEncode([Fax])
Then your SendToOutlook Formula URL field shown to the user would be this:
"SendToOutlook:CmdLine?TableId=" & Dbid() &
"&RecordId=" & [Record ID#] &
"&Fid=30"
When the field above is clicked, SendToOutlook is invoked and then reads the contents of the field specified to get the actual command line to be processed.
SendToOutlook Variables Inside QuickBase File Attachments
A QuickBase File Attachment specified for an Outlook field can have user-defined "variables" inserted into the file. These variables will be replaced with the value specified as passed to SendToOutlook. For example, an HTML file in a QuickBase File Attachment that can be used to set the HTML Body of an email might specify a variable for the Banner image:
<html>
<body>
<img src="{Banner}"</img>
.
.
</html>
Banner is a variable to be replaced by SendToOutlook with the value passed. Of course, the value must result in valid HTML code.
To perform the substitution, SendToOutlook is passed the QuickBase File Attachment, and optionally, a comma separated list of variable:value pairs (separated by a semicolon from the template itself). For example:
SendToOutlook:New?ItemType=Email
&To=joe@example.com
&HTMLBody=https://www.quickbase.com/up/bd5ghmxj5/a/r76/e36/v0;
Banner:http://www.SoftTechExperts.com/images/news.jpg,
Disclaimer:"Only intended for SoftTechExperts employees, and friends!",
Footer:https://www.quickbase.com/up/bd5ghmxj5/a/r99/e36/v0;Copyright:2011
In the example above, there are three variables named Banner, Disclaimer, and Footer.
SendToOutlook will search the template for each variable, surrounded by curly braces, and replace the variable with the value specified.
The variable name can be any text string, without spaces. The value can either be one of two things:Text string - surrounded by quotes if it contains a comma, two double quotes to include a single double quote. For example, Disclaimer:"Intended for ""authorized personnel"", and friends only."
Or
QuickBase File Attachment - The contents of the File Attachment is used as the value. For example, Footer:https://www.quickbase.com/up/bd5ghmxj5/a/r99/e36/v0. This can have variables specified also, such as Footer:https://www.quickbase.com/up/bd5ghmxj5/a/r99/e36/v0;Copyright:2011
How Does SendToOutlook Work?
You might be familiar with the syntax of a standard web page link which begins with http: followed by the web page address, such as http://www.google.com. That's called a URL protocol. SendToOutlook is similar in that it also uses the standard URL protocol approach. However, instead of beginning with http:, it begins with SendToOutlook: (with no //) along with a command of action to take, parameters indicating the type of Outlook item to create, and values for fields.
For example,
SendToOutlook:New?ItemType=Meeting&Subject=Pricing
