The first thing I always check is permissions. Can the user that initiated the workflow also use the Word automation services?
Thanks Andrew
What do you mean by "use the word automation services"?
It is a service application in the farm. Should we allow a named user who manages workflow to access services in Central Admin? there is probably a more general way to do that...
Please clarify.
Thanks!
Avishay
Hi Avishay,
Can you confirm that the document is .docx and not .doc? And have you checked to see that the Office Web Apps features for the site has been enabled under the site collection features?
There are various ways you can prevent access to any service application, like the features Francois mentions or not having the proxy service setup under the word automation service application in Central Admin. A good way to test the service is using PowerShell if you had never seen WordAS work before. Here is example code.
# Input parameters for the script
$wordFile="http://site/library/docxfileurl.docx"
$pdfFile="http://site/library/pdffileurl.pdf"
# Get the Word Automation Service Proxy
$wasp = Get-SPServiceApplicationProxy | where { $_.TypeName -eq "Word Automation Services Proxy" }
#Create the Conversion job
$conversionJob = New-Object Microsoft.Office.Word.Server.Conversions.ConversionJob($wasp)
# Get the web url
$web = Get-SPWeb "http://webappurl/"
# Set the credentials to use when running the conversion job.
$conversionJob.UserToken = $web.CurrentUser.UserToken
# Conversion Job Name
$conversionJob.Name = "ConvertDOCXtoPDF"
$conversionJob.Settings.OutputFormat = [Microsoft.Office.Word.Server.Conversions.SaveFormat]::PDF
$conversionJob.AddFile($wordFile,$pdfFile)
# Start the conversion job
$conversionJob.Start()
Thank you Andrew
Running the PowerShell script on a specific DOCX file works. I got a PDF version of the same file on the document library with no issues.
This means that the issue is either related to permissions or to Nintex settings. The person who has built the workflow has full permissions on the site. If you (or others) know about specific settings we need to change in order to make it work from a Nintex Workflow, I will be glad to hear.
Thanks
Avishay
Did you perform the powershell on the same site and same document? The only time I've seen this error come up was when the Word automation service was not configured to run on the specified Web Application in Central Admin.
- On the Central Administration Home page, click Application Management.
- On the Application Management page, in the Service Applications section, click Configure service application associations.
- On the Service Application Associations page, select Web Applications from the View drop-down menu.
- In the list of Web applications, in the Application Proxy Group column, click the name of the service application connection group that you want to change. Make sure the Word Automation Service is visible for your web application here.
Thanks
Indeed, the Word Automation Services Proxy was not selected in the default association group.
In order to fix that I added it using PowerShell:
$wordProxy = Get-SPServiceApplicationProxy | where {$_.TypeName -like "*word*" }
$WordProxyId = $wordProxy.Id
$G = Get-SPServiceApplicationProxyGroup -Default
Add-SPServiceApplicationProxyGroupMember $G -Member $WordProxyId
Once the association contained the proxy it all worked fine.
Thanks for your help Andrew!
No problem! Glad you're up and running. Like I mentioned, the first thing I always check is permissions/access. I keep a slogan "10 times out of 10, it's permissions!" when troubleshooting with SharePoint.