Solved

Word Merge Issue

Posted on 2002-06-30
11
199 Views
Last Modified: 2010-05-02
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

0
Comment
Question by:terbar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 3
11 Comments
 
LVL 44

Expert Comment

by:bruintje
ID: 7121033
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
 

Author Comment

by:terbar
ID: 7121085
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
 
LVL 44

Expert Comment

by:bruintje
ID: 7121116
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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
LVL 4

Accepted Solution

by:
AlonHirsch earned 500 total points
ID: 7121724
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
 

Author Comment

by:terbar
ID: 7121824
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
 
LVL 4

Expert Comment

by:AlonHirsch
ID: 7121940
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
 

Author Comment

by:terbar
ID: 7122023
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
 

Author Comment

by:terbar
ID: 7122029
AlonHirsch, Does your company make the code you used availabe for purchase?
0
 
LVL 44

Expert Comment

by:bruintje
ID: 7122522
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
 
LVL 4

Expert Comment

by:AlonHirsch
ID: 7123840
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
 

Author Comment

by:terbar
ID: 7123883
Alon,

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

Thanks!
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question