Announcement

Collapse
No announcement yet.

MS-Word document

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • MS-Word document

    I want to generate a worddocument with the content of the fields in a sc-form
    i.E I the have name, the adress etc in a form and want to make a Word document with the content of the fields in it.
    I could prepare a word-template with bookmarks etc. and use it in combination with scriptcase.
    Word should open with the filled fields on the right place and after that I start typing the content in the middle.

    Question: What are steps to go...starting with the form in sc.

    Can somebody help me?

    Kind regards

    Bert Steinebach

  • #2
    Originally posted by ctmservice View Post
    I want to generate a worddocument with the content of the fields in a sc-form
    i.E I the have name, the adress etc in a form and want to make a Word document with the content of the fields in it.
    I could prepare a word-template with bookmarks etc. and use it in combination with scriptcase.
    Word should open with the filled fields on the right place and after that I start typing the content in the middle.

    Question: What are steps to go...starting with the form in sc.

    Can somebody help me?

    Kind regards

    Bert Steinebach
    Hi Bert,

    I assume that you want to create a docx as this is a text word format. If not, you should create a rtf file which can be opened by MsWord. What I useually do is create a template file in RTF so that fonts etc. are all in place. Where I want to store the data I create a template variable, i.e. [%myname%] In some event I read the rtf and do a stringreplace of the templatevariable by my scriptcase variable. Then it's done. Finally to download you need to create a blanc application so that you can set the correct output header so that word is opened. After generating the file you put the text in a global variable and call the blanc application to get it output as rtf.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      If you want to do that in word you could also install word on your server and control word via DOM.

      http://msdn.microsoft.com/en-us/libr...ffice.12).aspx
      http://msdn.microsoft.com/en-us/library/kw65a0we.aspx
      http://ca3.php.net/com
      http://webcheatsheet.com/php/create_...s_with_php.php

      Alternatively:
      http://www.phpdocx.com/
      http://www.phpclasses.org/package/26...M-objects.html
      http://www.phpclasses.org/package/81...-template.html


      etc... there is a LOT of info on how to do that. Basically using COM makes working with word quite easy....

      Comment


      • #4
        Thanks for yours answers. (Albert and rr)
        I will work on it and give a reply of the results on this forum.
        Kind Regards Bert

        Comment

        Working...
        X