3

I have a document library with two custom content types. If I use the web interface and choose New Document -> MyCustomType the document template opens up and I can create and modify the document and list item properties.

I then created a workflow using SharePoint Designer 2010 and setup an action to create a new list item on my document library. I gave it a name and set the content type to MyCustomType. The workflow executes without error and creates the document - but I can't open it in Word. I get the following error: The file test.docx cannot be opened because there are problems with the contents. There are no additional details.

I opened up the .docx file and looked at the embedded XML and I can see that it is using the correct template. Any ideas why Word is failing to open the document or something I can do to troubleshoot / get more info on the error?

Update: I recreated the template from an empty word doc and the problem is resolved. I would like to leave the question open for now in hopes of better troubleshooting advice for repairing an existing template.

6

I had the same issue. All you have to do is just to save the document template (dotx) as word document (docx ).

  • this is the answer. – Justin Feb 5 '13 at 2:36
2

I had a similar problem. I had to rename the template to docx in the advanced setting page as well as saving it as a docx file. But I also had to use Word 2010, not Word 2013 to create and save the template. Note: I am currently on SP2010 so it seems it's some kind of conflict with the headers that Word 2013 was introducing. Just in case others may need help with this.

1

Please make sure that the document template (the content type document template) is doc or docx, and not dotx. In the workflow - Create Item - Path and Name should contain the name of the file and the correct file extesion (exaclty as the document temple extension).

for me the workflow created a corrupted word document because the template was dotx and the workdlow created a docx, once I changed the content type document template to a docx the problem solved

0

I've seen this happen (through the twittersphere) in the past with 2007. This details how to do it, http://www.documentmanagementworkflowinfo.com/sample-sharepoint-workflows/sharepoint-designer-workflow-create-new-document-based-content-type.htm

This article looks to be specifically geared at SPD 2010, http://mysharepointguru.com/business-processes/creating-docs-with-sp-desiger-2010-a-workflows.html.

  • I don't have an issue creating the library, content type, template or workflow - those are all fine. The problem is that the document created from the workflow is somehow corrupted when using the workflow, while the document created when choosing a new document from the content type template using the ribbon controls. – Goyuix Jun 4 '12 at 4:21
0

Please try to add some content in the document using the workflow and please try again.

0

When you're editing the workflow in SP Designer and you add the step to Create New List Item, make sure to add Content Type ID to the list of Fields. I had this exact same error and was able to resolve it by specifying the Content Type ID. Here's where I found the hint: http://www.quercussolutions.com/blog/index.php/out-of-the-box-document-generation-in-sharepoint-2/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.