Word Merge Issue

I just emplemented word merge in our browser based case management system.  I created a directory on each of my user's C drives, c:\webmerge, to hold the MSWord merge documents and the source data text files that the merge documents will use as a data source.  My merge documents are programmed to look for the text file in the c:\webmerge folder, and I also require that a copy of the master merge document be manually copied down to the c:\webmerge folder whenever the master template document is updated (which may be every few months or so).

This is used in my application by the user requesting a form from a list on a certain customer's account, and then the Word Document will seemlessly open with the customer's data merged into the document.  Behind the scenes, my web server queries the database and creates the souce data text file, c:\webmerge\form119.txt, and then builds the html that will open the specific document, c:\webmerge\form119.doc, and sends this down to the client.

This works fine, however, I would like to move away from my c:\webmerge folder method to possibly a more conventional method of storing these files on the client so that I don't have to create a specifically named folder on each client and I don't have to manually copy the template down each time we modify them... or maybe there's some other way of accomplishing this all together.  I definately want to stay away from server-side processing.

Thanks

terbarAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Alon HirschConnect With a Mentor Software Development ManagerCommented:
Hi,

I agree with bruintje - the best solution is a component running on the Client side, and could be written as follows :
Your component to handle this would be an OCX and will be placed in the HTML page by the Server (ASP). It could then query the database or an ASP page to get the source for the merge which it can store internally in an array or something like that, as well as the .DOC file, which it can open directly if it is referencing MSWord.
It can then perform the merge for you using whatever template you wish.
It can even check if there is a new template and donwload it too.

We have just implemented a control that uploads and downloads files from a user's PC to our web server using a similar scenario, and it really works very well.

HTH,
Alon
0
 
bruintjeCommented:
Hi terbar,

The only way to solve it differently (is there a good reason for that?) is
-let a component query the database (as it does now through the webserver)
-instead of writing the data to a textfile do the merge right in the program
-that frees you from the textfile
-but the template has to be there anyway, and it doesn't matter much but you can store it
in the word template directory on the client under c:\programfiles\office etc...
-so then you don't need the webmerge directory

but i'm still curious why you would to solve it differently, how have you done it now with ASP or something?

HAGD:O)Bruintje
0
 
terbarAuthor Commented:
How do I merge in the program?  Would I have to run MSWord on the Server... :(.  Do you have example?  Could the template remain on the Server side v. c:\programfiles\office...?
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
bruintjeCommented:
thougt you said in your question

>>definately want to stay away from server-side processing

on your client it would be vb
on your server it would be asp

could you please give a bit more background on your current setup, just to get an idea? before i make the wrong assumptions
0
 
terbarAuthor Commented:
AlonHirsh,

Do you know of any sample code that I can look at?  I'm looking for a specific solution that doesn't require research and trial and error time.

0
 
Alon HirschSoftware Development ManagerCommented:
Unfortunately, I can't give you the code I used - company copyright stuff and all that, but you can simply wrap the Internet Transfer Control into an OCX, setting the URL etc.

HTH,
Alon
0
 
terbarAuthor Commented:
I understand.  Unfortunately, this doesn't solve my problem as I will have to research OCX development, and therefore it will be my next question.  I'm looking for specific solution/examples if the solution involves OCX or ActiveX.
0
 
terbarAuthor Commented:
AlonHirsch, Does your company make the code you used availabe for purchase?
0
 
bruintjeCommented:
Hi terbar,

found another way of looking at this

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q285176

of course don't know if it exaclty what you need but there's some in it that could be useful

just let us know

:O)Bruintje
0
 
Alon HirschSoftware Development ManagerCommented:
Hi,

Unfortunately not, but if you really need something, I can throw a simple sample together and email it to you.
Let me know your email address if you would like me to go ahead and do it.

Thanx,
Alon
0
 
terbarAuthor Commented:
Alon,

That would be great!  Email is sndip@cox.net

Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.