1. Configure Supported Document Formats for Conversion
Scenario/Problem: You need to modify the supported document formats for Word Services.
Solution: Use the AddSupportedFormats
and RemoveSupportedFormats
parameters with the Set-SPWordConversionServiceApplication
cmdlet.
By default, all available document file formats are supported within Word Services. You can use the AddSupportedFormats
or RemoveSupportedFormats
parameters with the Set-SPWordConversionServiceApplication
cmdlet to modify which set of formats is supported.
Both of these parameters take a comma-separated list of valid document formats. The recognized values are as follows:
• docx
: Open XML document. This essentially is any Word 2010 or Word 2007 document and includes .docx
, .docm
, .dotx
, and .dotm
documents.
• doc
: Word 97–2003 documents. Provides support for older Word documents with .doc
and .dot
extensions.
• rtf
: Rich Text Format. Supports only .rtf
files.
• mht
: Web page. Any HTML-based web page, including .
htm, .html
, .mht
, and .mhtml
documents.
• xml
: Word 2003 XML document. Any Word 2003 document saved as an .xml
file.
As an example of how these parameters operate, removing doc
also removes support it for .dot
documents. The supported formats are grouped together and cannot be
broken apart. These groups correspond to the available options
available through Central Administration, as shown in Figure 1. Listing 1 shows sample command lines.
Listing 1. Modifying the Supported File Formats
Set-SPWordConversionServiceApplication
-Identity "Word Automation Services" -RemoveSupportedFormats rtf,mht
Set-SPWordConversionServiceApplication
-Identity "Word Automation Services" -AddSupportedFormats docx,doc
Figure 1. Supported document options for Word Services.
You can use quotation marks around a single
file format; however, when you are providing a comma-separated list of
formats, you cannot use quotation marks. No errors are presented,
although the operation cannot modify the settings.
Tip
When scripting out supported file format operations, use the ClearSupportedFormats
parameter first to start with a clean slate; then just add the
supported types. This ensures that any unsupported types do not remain
active.
2. Modify Database Information
Scenario/Problem: You need to modify the database that Word Services should use.
Solution: Use the database parameters with the Set-SPWordConversionServiceApplication
cmdlet.
Three database parameters can be used to configure the database settings for Word Services: DatabaseServer
, DatabaseName
, and DatabaseCredential
. The DatabaseCredential
parameter is used only if the authorization is performed through SQL
authentication. Even though all these parameters are optional overall,
if the DatabaseCredential
parameter is used, then DatabaseServer
and DatabaseName
become required. Listing 2 shows a sample modification of the database settings.
Listing 2. Changing the Database Configuration for Word Services
Set-SPWordConversionServiceApplication
-Identity "Word Automation Services" -DatabaseServer SP2010
-DatabaseName WordServices -DatabaseCredential (Get-Credential)
Tip
Use inline credentials instead of (Get-Credential)
.
If the database described within the DatabaseName
parameter does not exist, it is created automatically.
Tip
Use the database parameters to
create a new database without the GUID. Delete the old
WordAutomationServices_GUID database afterward.