Introduction

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.

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 can be difficult, 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 can leverage the PDF-Upload feature to upload your documents and drag and drop merge fields onto them. However, uploaded PDFs have certain limitations; namely, they do not support related lists.

To work around PDF-Upload limitations, you can convert your existing 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. You may need to edit the template after conversion in order to make it appear as the original.

DOC & DOCX

The DOC and DOCX formats are 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. These formats are often used when there is a need to uniquely edit or personalize each document after it has been created.

Although both templates are output as Microsoft Word files, DOC templates are configured and edited within the S-Docs template editor, while DOCX templates are configured and edited within Microsoft Word and then uploaded to the S-Docs template editor.

DOC Templates

DOC templates are great if your document is very large or needs to include a lot of data-driven formatting. Since they're built and edited within the S-Docs template editor, there's a lot more flexibility when it comes to things like custom related list tables.

When you generate DOC templates, S-Docs uses the template definition you provide to create a new DOC file. You don’t need to configure a connector, plug-in, or any macros. This means you cannot use an existing DOC file (however, you can use the Paste From Word button to copy content from an existing DOC file into the template editor). After generating the document, the user can then leverage all the features of MS Word to further tailor the content of each message.

The following special S-Docs syntax can be used to insert a table of contents in your DOC template:

##TOCSTART## and ##TOCEND##

DOCX Templates

DOCX templates are built entirely within Microsoft Word and then uploaded to S-Docs. They're great for documents with a lot of non-data-driven formatting, since you can leverage the full feature functionality of Microsoft Word to easily insert tables, tables of contents, and other elements. The DOCX format is useful for users who are already proficient in Microsoft Word.

S-Docs elements like merge fields, related lists, and conditional logic can be included in your DOCX templates as well -- users simply need to copy syntax from the S-Docs template editor and paste it into their Microsoft Word document within square brackets.

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

For templates with complex, data-driven formatting requirements, the DOC type should be used instead of DOCX, since more complex formatting is only supported within the S-Docs template editor.

XLS

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

Note: Similar to how S-Docs generates a DOC 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.