I need to figure out the best route for having a user create a document from a workflow. Here is the basic process of the workflow:
So my question is what is the best approach to do this. I was thinking Create a Task Content Type that is the same as the Document, have a Task Form they fill out and then when task item is created just have it create it in the document library that way or is there a way off the actually task that you can have the user fill out a form for the document library that creates the document.
Any insight or suggestions into this would be great as this i first time have attempted something like this within a workflow.
Solved! Go to Solution.
The way I do this is to create a Content Type based on a document template that is associated with the destination Library. This document template will have Content controls placed throughout that will be the frames for receiving the data from the user.
When the workflow is run and the user is prompted to create the content that goes into the document, you have a create item action that creates the document in the destination library with the aforementioned content type. Once the document is created, use an update document control to populate the content controls in the document with data from the supplied information.
Please note, that at this stage you can only update text content controls, so don't even try to do anything with images. I have got a separate SQL SSIS package that I developed to replace a picture placeholder in the document with an image, but this was a major bit of OpenXML document development.
I hope that helps guide you.
Did you just use a Request Data Action to get the information from the users to then do your Update Document?
1) Create Document Item
2) Request Data Action - Get user input - Save into variables
3) Update Document
Is that how you did it just so i know that did the layout correctly.
Lucky enough I don't have to worry on doing anything with images yet.
Sorry for the late response - 4 day weekend!
I use Flexi-tasks to gather the information, but this should not make any difference.The rest of your assumptions are correct. Make sure to include a "Commit Pending Changes" action after the document update. The key is setting up the Content Controls on the word document correctly. The definition of the font styles seems rather crappy and I spend most of the time tring to get the control to format the way I want, usually resorting to opening the document template xml and "massaging" it there!