Solved

Word Merge Issue

Posted on 2002-06-30
11
194 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
  • 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

746 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now