Professional Web Applications Themes

ASP to Word - ASP Components

Hi All OK I thought this would be a simple case of connecting to the Word object and do the same stuff I can do in vb6 desktop dev, but I know I was wrong. In essence, I created a desktop app that takes data from a DB, munges it and 'pastes' this all over a Word Doc template and although this works fine, I've got to make the whole app web based to save my sanity! Problem is doing the old VBA app to Word thing doesn't appear to be a good thing and info seems sp on the ...

  1. #1

    Default ASP to Word

    Hi All

    OK I thought this would be a simple case of connecting to the Word object
    and do the same stuff I can do in vb6 desktop dev, but I know I was wrong.

    In essence, I created a desktop app that takes data from a DB, munges it and
    'pastes' this all over a Word Doc template and although this works fine,
    I've got to make the whole app web based to save my sanity! Problem is
    doing the old VBA app to Word thing doesn't appear to be a good thing and
    info seems sp on the best way to tackle this. I don't want to go down
    the 3rd party COM route as I've been stung by this before when my ISP
    wouldn't host a particular COM, so I'd appreciate any pointers anybody could
    give.

    Thanks


    Mojo Guest

  2. #2

    Default Re: ASP to Word

    Mojo wrote: 
    Since you need to work with a template, I believe you will need to use a
    third-party component like the one offered by ASPOSE for this.I used it
    and it worked very well for this purpose.

    Microsoft discourages automating Office applications in server-code.
    See:
    http://support.microsoft.com/default.aspx?scid=KB;en-us;q257757

    Alternatively, you could save that template file as html, use
    filesystemobject to open a textstream, do your replacements, and write
    the result to Response. Depending on the size of the template, this
    might work for you.

    --
    HTH,
    Bob Barrows


    Bob Guest

  3. #3

    Default Re: ASP to Word

    Hi Bob

    Thanks for your reply.

    I noticed the ActiveX DLL option, but have had real problems getting this to
    work. Is it the case that I can't even use this if I using a Shared Hosting
    ISP? I would have thought the registration process is all done on the
    client rather than the server.

    My feeble failed attempt is as follows:

    <HTML>
    <HEAD>
    <TITLE>TestWord</TITLE>
    </HEAD>
    <BODY>
    <OBJECT ID="clsTestWord"
    CLASSID="CLSID:7366ED3D-A93D-404C-B971-1936C37B5DBB"
    CODEBASE="TestWord.CAB#version=1,0,0,9">
    </OBJECT>

    <SCRIPT Language="VBScript">
    clsTestWord.ShowDoc "http://myurl.com/progress.dot"
    </SCRIPT>
    </BODY>
    </HTML>

    Basically I:

    * created a VB ActiveX DLL/Class Module
    * created a public sub inside this module that basically opens up the .dot
    and displays it.
    * built the DLL
    * used the package & deploy to get the CAB and the CLSID
    * uploaded the asp file, the cab and the dot file to my host

    All I get is Object doesn't support this property or method!

    Any ideas?

    "Bob Barrows" <SPAMcom> wrote in message
    news:phx.gbl...
    Mojo wrote: 
    Since you need to work with a template, I believe you will need to use a
    third-party component like the one offered by ASPOSE for this.I used it
    and it worked very well for this purpose.

    Microsoft discourages automating Office applications in server-code.
    See:
    http://support.microsoft.com/default.aspx?scid=KB;en-us;q257757

    Alternatively, you could save that template file as html, use
    filesystemobject to open a textstream, do your replacements, and write
    the result to Response. Depending on the size of the template, this
    might work for you.

    --
    HTH,
    Bob Barrows



    Mojo Guest

  4. #4

    Default Re: ASP to Word

    Mojo wrote: 
    > Since you need to work with a template, I believe you will need to
    > use a third-party component like the one offered by ASPOSE for this.I
    > used it
    > and it worked very well for this purpose.
    >
    > Microsoft discourages automating Office applications in server-code.
    > See:
    > http://support.microsoft.com/default.aspx?scid=KB;en-us;q257757
    >
    > Alternatively, you could save that template file as html, use
    > filesystemobject to open a textstream, do your replacements, and write
    > the result to Response. Depending on the size of the template, this
    > might work for you.
    >
    > --
    > HTH,
    > Bob Barrows[/ref]

    --
    HTH,
    Bob Barrows


    Bob Guest

  5. #5

    Default Re: ASP to Word

    Sorry, I've never attempted this. I suspect you will need to use an HTML
    Application (HTA) which is out of the scope of the ASP newsgroups. If
    you wish to pursue that route, you should read up on the subject at
    support.microsoft.com
    Mojo wrote: 

    --
    HTH,
    Bob Barrows


    Bob Guest

Similar Threads

  1. Getting Word Count from MS Word files
    By CNaser in forum Macromedia ColdFusion
    Replies: 0
    Last Post: June 22nd, 03:21 PM
  2. No Word, no cry!!!!
    By MrVST@adobeforums.com in forum Adobe Illustrator Windows
    Replies: 5
    Last Post: July 18th, 02:54 PM
  3. Preventing MS Word Footers being used in word to pdf conversion
    By Doncasters_MIS@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 2
    Last Post: April 5th, 03:31 PM
  4. Replies: 5
    Last Post: September 1st, 09:48 PM
  5. Replies: 5
    Last Post: July 4th, 01:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139