Attaching documents to list items using document templates

MVP

I've got a list with attachments enabled. This works fine for adding new attachments to the list item.

 

Now my customer wants to add documents using document templates. These templates have already been connected to document content types on my document library. So with the following html I can open word and applying the right template.

 

<a onclick="CoreInvoke('createNewDocumentWithRedirect2',event,'https:\u002f\u002fportaldev.mycustomer.com/Enterprise/commercial\u002fShared Documents\u002fForms\u002fNon-Disclosure%20Agreement\u002fMy Template.docx', 'https:\u002f\u002fportaldev.mycustomer.com/Enterprise/commercial\u002fShared Documents\u002fNon-Disclosure Agreement', 'SharePoint.OpenDocuments', false, 'https://portaldev.mycustomer.com/Enterprise/commercial/_layouts/CreateNewDocument.aspx?id=https://po... Template.docx', true, 1); return false;" href="#">New NDA</a>

 

 As I'm using a 3rd party form solution anyway adding the above link is easy. 

 

My question now is what is the best way to connect the document to my list item. I would like to avoid:

1. saving the document locally and then attaching it to the list item.

2. needing the user to save the document in a specific location with a specific name within SharePoint so that a background process can connect things up.

 

If I could set some document properties with for example an ID of the item then that would be ok, but I can't find any option for that.

 

Any ideas?

 

 

 

 

2 Replies

I try to stay away from List Attachments as much as possible. Attachments are inherently difficult to work with and prevent users from taking advantage of the document management/collaboration features of SP.

 

If these docs are getting created in SP, i would create them in a doc library, then at an appropriate time, initiate a workflow to populate a list and add a link from the List to the document.

 

If they are getting created outside of SP, i would use the Document Organizer feature, upload the files to a Drop Off library, assign the content type, send them to a location and then run workflow to populate a list with a link to the file.

Hi @Dean Gross,

 

I would tend to agree with your appraoch. The reason why I'm going for the list appraoch is that I need to user submitting a document to complete a form with metadata.

 

Of course I coul dget users to upload a document, then get them to select edit properties and with a bit of luck a user can figure out how that get this all done.

 

Instead of the above, I've created a link on page ( no mistake possible here) then a form appears  with all the fields to fill in including attachments. This means that wihtin a single action I can collect all the information and document. The only thin I can't handle is the option to use set templates to the attachments.

 

Once the fomr has been submitted the attachment is copied into a document library and the details supplied on the list item form are copied to the document's properties as well.