none
Use Sharepoint 2013 list data record in a word template

    Question

  • Hi Guys,

    I'm not a developer, but I dare to get my feet wet in your developer forum :)

    I was creating hosting pack offers in word for 20 customers and I was wondering If I could not replace my copy paste actions of service descriptions with a link to the SharePoint 2013 list I was copying from.

    SITUATION

    • Word templates are stored on our SharePoint templates library, synched to each computer with SkyDrive pro
    • Word template location is set to each users SkyDrive Pro location (Documents\skydrivePro\Templates)
    • This way all our users can use any of our templates when clicking new/templates/shared in word
    • Hosting service discriptions is a SP list (site.be/sales/hostingpackages/allitems.aspx)
    • Customer data is also a SP list (site.be/sales/customers/allitems.aspx)
    • Hosting discription has columdn headers like

              Packing Name/WebSpace in MB/mailboxes/MailboxMaxSize...

    • Customer details has columns like

             CUstName/CustContactName/CustContactEmail ...

    GOAL

    1. Open Word
    2. Click new, then custom or shared and select "hosting offer.dotx" (stored on SharePoint and synched to local drive using SkyDrive pro)
    3. The doc opens as a new document1.docx and has som fixed formatting and text. then...

    QUESTION

    Here it comes...

    Can I use a pull down menu in the part where I currently type the customer details, that will give me all customers in the customers SharePoint list. Once I select the customers name, the other emtpy customer fields are filled in with this customers details? And the same for the next section, where I select a hosting packige from the second pull down menu and it fills in the table with hosting package specs?

    STEPS ALREADY TAKEN

    Well, I am sure I have seen this accomplisched using excel somwhere. Can't be that hard to do it on SP right?

    I read some articles that would let me create seperate libraries with custom content types per documentfor the data in the list. But it is not my intention to create a seperate library for every type of document I create offer for hosting, order for maintenance, etc). I just want to be able to retreive data from one line (record) in one or more SharePoint lists, And store the finished document wherever I want.


    Best Regards,

    Jurgen Verhelst
    ez Networking

    Thursday, June 06, 2013 12:48 PM

Answers

  • > Can't be that hard to do it on SP right?

    You would hope so. I would also have thought this kind of technique was in common use "out there" - if so, you are more likely to find this stuff in a more Sharepoint-oriented place. I had a brief look at some options in SP2010 (Don't have 2013 here yet).

     - in SharePoint itself, you can specify a lookup item (which looks up an item in your SP List) in the document library, and specify other columns that you want to see in the document library. But those extra columns do not result in automatic generation of items in Word's DIP or extra document properties for insertion as content controls. (I can see why). Further, if you need more than one column from the SP List to identify the row you want, you will probably need to create a column in the SP List that is derived using a formula (column1 & " " & column2, or some such)

     - It looks to me as if you could define columns in SharePoint that you fill in using a Custom DIP created in InfoPath, as long as your infrastructure supports that option. You need a secondary data source and some rules to copy data values from that to the SP-defiend columns. I haven't followed that to completion but it looks feasible.

     - You can definitely retrive info. from SP Lists using a .NET language and the SharePoint Client namespaces - see Eric White's article at http://msdn.microsoft.com/en-us/library/ee857094(office.14).aspx for some basic examples. I don't have code that can turn that into a complete solution but you may be able to find some. Each client would need the SharePoint dlls that he mentions.

     - Some time ago there was some discussion here - http://social.msdn.microsoft.com/Forums/en-US/worddev/thread/9b753040-72e2-4e11-bf31-63e1bd73e20c - about using the Office PickerDialog. Although no-one was able to provide a working example of how you could use it to access SharePoint data, I do wonder if there is a "datahandler" object built into Windows that would make it possible.


    Peter Jamieson

    Monday, June 10, 2013 1:51 PM

All replies

  • Hi Jurgen,

    Thank you for posting in the MSDN Forum.

    I'm trying to involve some senior engineers into this issue and it will take some time. Your patience will be greatly appreciated.

    Sorry for any inconvenience and have a nice day!

    Best regards,


    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, June 10, 2013 12:15 PM
    Moderator
  • > Can't be that hard to do it on SP right?

    You would hope so. I would also have thought this kind of technique was in common use "out there" - if so, you are more likely to find this stuff in a more Sharepoint-oriented place. I had a brief look at some options in SP2010 (Don't have 2013 here yet).

     - in SharePoint itself, you can specify a lookup item (which looks up an item in your SP List) in the document library, and specify other columns that you want to see in the document library. But those extra columns do not result in automatic generation of items in Word's DIP or extra document properties for insertion as content controls. (I can see why). Further, if you need more than one column from the SP List to identify the row you want, you will probably need to create a column in the SP List that is derived using a formula (column1 & " " & column2, or some such)

     - It looks to me as if you could define columns in SharePoint that you fill in using a Custom DIP created in InfoPath, as long as your infrastructure supports that option. You need a secondary data source and some rules to copy data values from that to the SP-defiend columns. I haven't followed that to completion but it looks feasible.

     - You can definitely retrive info. from SP Lists using a .NET language and the SharePoint Client namespaces - see Eric White's article at http://msdn.microsoft.com/en-us/library/ee857094(office.14).aspx for some basic examples. I don't have code that can turn that into a complete solution but you may be able to find some. Each client would need the SharePoint dlls that he mentions.

     - Some time ago there was some discussion here - http://social.msdn.microsoft.com/Forums/en-US/worddev/thread/9b753040-72e2-4e11-bf31-63e1bd73e20c - about using the Office PickerDialog. Although no-one was able to provide a working example of how you could use it to access SharePoint data, I do wonder if there is a "datahandler" object built into Windows that would make it possible.


    Peter Jamieson

    Monday, June 10, 2013 1:51 PM
  • Hi Jurgen,

    I temporarily marked the reply as answer. You can unmark it if it provides no help.

    Please feel free to let us know if you need any further help.

    Have a nice day.


    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, June 21, 2013 11:42 AM
    Moderator
  • Hi peter,

    I did not get an email of any of the replies... strange have to look into that

    Thank you very much for you info. As it seems not that easy for me I have forwarded your info to a SharePoint developer. and see how much time and money it would take to accomplish my goals.

    Thanks you


    Best Regards,

    Jurgen Verhelst
    ez Networking

    Sunday, June 23, 2013 2:52 PM