Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Export HTML page to currently open Word template or the like

Options
  • 12-01-2011 2:25pm
    #1
    Closed Accounts Posts: 7


    Hey,

    I have a webpage, that contains data pertaining to certain users etc. Username, Firstname etc.

    On this page, I would like a button, that when clicked, it would "export" the data to a Word document template, and thus allow the user to choose what fields should go where on their template from the list of data being exported.

    Has anyone done any work around this type of functionality? Any knowledge of exporting to Word templates? What tools or code did you use to achieve this action?

    Any thoughts, negative or otherwise greatly appreciated!

    Cheers,
    Bob.


Comments

  • Closed Accounts Posts: 18,056 ✭✭✭✭BostonB


    Theres a few ways of doing this. Do it on the browser side, using whatever web technology you want, and export a format XML, CSV that word understands. You can do merge with word and the exported data file. Purists won't like it but you can have ActiveX which allows you script word and control it that way. You can do lots with that. Permissions become a problem though.

    I've mainly only it done it for internal applications, to output letters, or reports from web apps/databases. Mainly because the endusers want to further edit the output. Which you can't do if you use PDF, Crystal or SQL reports. End users also have an existing skill set in Word/Excel which they want to use.

    Theres loads of different ways to do. The question really is should you be doing it. Some of the time theres a better way.


  • Closed Accounts Posts: 7 BobsYerAuntie


    Cheers BostonB, all makes sense. Off now to do more digging! Appreciate your thoughts.

    Bob.


  • Closed Accounts Posts: 18,056 ✭✭✭✭BostonB


    The issue with the activeX is that the user has to give permission to run it, and maybe its good idea to get it digitally signed. This is because VBA/Word code is run client side, not server side. Anoterh conideration, when you compile it with say VB6 instead of .Net you'll get a much smaller download and they won't need .net framework installed to run it. The ActiveX is a container for the VBA code.

    An alternative we've also used is to export XML that newer versions of excel and word can open. That probably the cleanest way of doing it.

    Or you could build a word template centrally located on a share, and build a VBA app in it, that connects to the database and has forms and user access rights for different data built in.


Advertisement