There are a multitude of different output types that S-Docs templates support. This document will go through five common ones and explain when to choose each one.

Introduction

Some document formats are better suited for certain document types. For example, PDFs typically work best for contracts since you do not expect users or clients to edit them after generating (although S-Doc PDFs can be edited if the "Allow Edit" feature is enabled). As an administrator, you should select the right format based on how you expect the document to be viewed, used and distributed.

You must select one output format for each template. If you want to give your users control of the format, you can simply clone your template several times and save each version with a different output format. If all the versions are made active, the user could then choose the template with their desired output format.

PDF

PDF documents created with S-Docs are self-contained. By this, we mean that the complete content is stored within the document rather than using links that retrieve content when the document is opened. Therefore, internet connectivity is not needed to view any embedded images and using relative links do not pose a problem. Since the PDF is viewed using a Reader, the output is very consistent and predictable even across mobile clients. Although S-Docs allows you to choose whether or not your users can edit documents (including PDFs) after they have been generated, if you keep this option disabled, editing PDFs is not trivial, meaning it is a good choice when you do not want the user to edit the document after it has been generated. Therefore, this output is well suited for documents like quotes, contracts, or product information sheets.

However, rendering in PDF does have some design considerations. Specifically, not all fonts are supported, nor are all CSS styles. To get the desired result, you may need additional editing time or are afforded some leeway on the final output.

If you have existing company PDFs that you would like to use with S-Docs, you need to first convert the PDF to HTML so that it can be saved as an S-Docs template. Adobe provides free automatic conversion tools that can be found here: http://www.adobe.com/products/acrobat/access_onlinetools.html. Again, you may need to edit the template after conversion in order to make it appear as the original.

MS Word

This is often the best choice for rendering form letters, especially when the message needs to be tailored for each document, such as customer service letters or meeting follow-ups. You can still embed company logos, rep signature images and automatically insert needed Salesforce.com data fields. This format is often used when there is a need to uniquely edit or personalize each document after it has been created.

When you select MS Word as the template output type, you will see a Set advanced Microsoft Properties button. You can use this feature to set margins, headers, and footers. The following special S-Docs syntax can be used in your template:

##TERMS## - Used to insert a terms and conditions section elsewhere than end of document

##PAGEBREAK## - Used to force a manual page break

##TOCSTART## and ##TOCEND## - Used to insert a table of contents

You don’t need to configure a connector, plug-in, or any macros. S-Docs uses the template definition you provide and creates a new MS Word file. This means you cannot use an existing MS Word template (.doc file). After generating the document, the user can then leverage all the features of MS Word to further tailor the content of each message.

DOCX

Important: With DOCX, you can make your edits directly in the word file, add in your merge fields and related lists, and then upload your DOCX file to the template editor. If you have selected the file format "DOC," you can make your edits directly in the template editor, and upon generation download your DOC file to word.

Please refer to this documentation for important information regarding DOCX syntax and generation.

MS Excel

For large related lists, you may want to render your document using MS Excel. After a user creates the S-Doc, they can update the spreadsheet as usual.

Note: Similar to how S-Docs generates an MS Word document, S-Docs does not populate an existing .xls file with data, but rather generates a new .xls file. This means that you do not need to create and share a template .xls file. All definitions and formulas should be defined in either Salesforce formula fields, or alternatively, using the S-Docs template editor. If you have existing xls documents you want to use with S-Docs, you will need to save them as HTML and use the HTML output as the basis for your S-Docs template. You may need to remove some special formatting Microsoft automatically adds to the document that prevents non-Microsoft browsers from rendering the document correctly. There are also tools available online for converting Excel to HTML.

Tip

Since it is often difficult to predict a particular cell location that your S-Docs field will render to in MS Excel, and since many formulas require cell locations, it is often easier to create formulas using a two step process. First, you create your fields and render the document without any formulas. Then, once you have identified all your target cell locations, you can add your excel formulas using the S-Docs Template Editor.For example, typing the following text into the S-Docs template editor will sum the values of the contents of rows 4 through 8 in Column A.

=SUM(A4:A8)

You can also use a VLookup function to help locate values you want to update with Salesforce data. Here is a useful resource for creating Excel formulas: http://www.mrexcel.com/archive/Formulas/index.html

HTML

HTML is the most flexible of the output formats. HTML docs can even contain editable text areas. This is the format of choice if you wish to send an in-line document via email. However, you should note that images are retrieved when the document is viewed. For this reason, we do not consider the document "self-contained." This means users not only need to be connected to the internet to view your document appropriately, but also to have access to the embedded images. While embedded images can be useful for tracking, rendering consistent HTML on a variety of devices, browsers and email clients can also be challenging.

Note: If a user emails an HTML S-Doc during the last step of generation, S-Docs will automatically include the document in-line as HTML in the email body.

Using Images

If you are looking to embed images into your S-Doc, check out these guides on how to embed dynamic images or static images in your document.