5

I have a list with attached a 2013 workflow that should create a word document. I have followed this article.

Unfortunately, no matter what I write in my template.docx template, the workflow created docx is always empty.

What could it be?

EDIT: Steps:

  1. Created a new Document Library choosing advanced options and Microsoft Word as template.
  2. Added a Text column (ex. mycolumn)
  3. Created a new list with a Text column mycolumn
  4. In the new Document Library Advanced Settings, under the Document Template I edited the dotx document. I Added some text and in Insert/Quick parts I chose mycolumn. Then I saved it as docx.
  5. Created a 2013 workflow associated with the new list that adds a new item to the Document Library. The new item picks mycolumn and title from the new list and associates them to mycolumn and Path and Name of the document library
  6. Added a new item to the new list. When the workflow ends I see a new docx document in the document library. Unfortunately it is empty.
  • what is the content in the document template? Do you have any quick parts in it? Can you add the steps you performed in your question – Unnie Nov 4 '14 at 12:56
  • #Unnie I edited with the steps I performed. – Gyonder Nov 4 '14 at 15:24
  • To troubleshoot try creating new item in that document library , see whether your edited doc template is being used. Another thing to check in the workflow what is the content type of the new item – Unnie Nov 4 '14 at 15:56
  • #Unnie , my edited doc template is not used. How to check in the workflow what the content type of the new item is? – Gyonder Nov 4 '14 at 16:25
  • Verify the template URL again, see it is showing the correct docx file you have created. Make sure it opens the correct template in browser and then move to workflow – Unnie Nov 4 '14 at 16:30
2

It is most likely a Content type problem with your word document, your workflow (I had to use a 2010 workflow) and your content library.

I had a similar problem and solved it as follows:

1)Create a Content Type, assign it to your library, set it as the default Content Type, delete the Document Content Type (from the library).

2)Create a Blank word document, upload it to your library, you will be asked to set its document properties, ignore them (unless mandatory) and click 'Save'.

3)Open your newly added document in Word (client application), customize it as required and add all the document properties you need (Insert -> Text tab => Quick Parts -> Document property), save as 'newDocumentTemplate.docx' (Word document, NOT Word Template!) in a local folder (e.g. Desktop).

4)Navigate to your document library -> settings -> content types -> click your content type.

5)Navigate to its advanced settings and use 'Upload a new document template:' to upload 'newDocumentTemplate.docx', click OK.

6)Open the workflow associated to your list and check that you set the correct (i.e. your new Content type) content type when creating a Document library.

Sources: http://mysharepointguru.com/business-processes/creating-docs-with-sp-desiger-2010-a-workflows.html

Section: Building a Document in a Workflow http://www.quercussolutions.com/blog/index.php/out-of-the-box-document-generation-in-sharepoint-2/ Sections: From Step 2 – A document template library containing the document template that we will use on to the end of the article.

Hope this helps.

1

I spent weeks on this as well. I ended up creating the .docx for the template in a separate document library. I gave it a unique title. I then used workflow to copy the document over to the document library I was using with workflow. I told workflow to update document I had copied over using the title to find the item. When testing I needed to put a pause for 1 min so it would copy the file 1st then it would update the file auto filling all of the quick parts. I ended up putting in a support ticket to Microsoft for this issue. They said it was a known bug. The also said the would let me know IF a fix for it was coming out and get it to me. I received the same thing from the TechNet site.

On the Office 365 site they have the 2010 and a work around way. Info can be found here.

1

I got the same problem and the fix was to build a Sharepoint 2010 Workflow. Follow the steps mentioned here:

http://netwovenblogs.com/2015/04/24/how-to-dynamically-create-and-populate-word-document-in-a-document-library-from-custom-list/

In the comments of the site the author states that populating a document will only work with a 2010 workflow.

  • 1
    Can you please add description from the link. Only link will not help the most. – Asad Refai Feb 17 '16 at 12:17
-1

Its a bug, you need a sharepoint 2010 workflow.

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.