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 sparse 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
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
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" <reb0...@NOyahoo.SPAMcom> wrote in message
news:OKNofGEF...@TK2MSFTNGP03.phx.gbl...
--
HTH,
Bob Barrows
--
HTH,
Bob Barrows