Solved

Problem doing a Mail Merge with Word 97 in Windows 95

Posted on 2000-04-06
4
156 Views
Last Modified: 2010-05-02
I'm writing an application that does a mail merge on the fly.  I pass the recordset to already existing document and then it merges. I'm runing Windows 98 and Word 2000 and it's working great, but I installed this software on Windows 95 and Word 97 and it doesn't want to open Word 97 or do any kind of operations. Can anybody help with this problem, it's very urgent.  I appreciate your help and thanks for your time.
Russ
0
Comment
Question by:odessamama
  • 2
  • 2
4 Comments
 

Author Comment

by:odessamama
ID: 2690226
I appreciate anybody's help.  Thanks for your time.
Russ
0
 
LVL 32

Accepted Solution

by:
bhess1 earned 100 total points
ID: 2690415
Odds are you are referencing the Word library in your Project/References, correct?  You will need to change that - you need to use CreateObject to reference whichever version of Word the user has:

Dim wdApp as Object
Set wdApp = CreateObject("Word.Application")

Instead of:

Dim wdApp as Word.Application
Set wdApp = New Word.Application

This allows the OS to retrieve the current version of Word on the PC, instead of tying your code to one version library.
0
 

Author Comment

by:odessamama
ID: 2690610
Thank you bhess1.  It works almost correctly now.  It brings up Word 97 and merges correctly, but I have to select the data source 2 after I already select it in my application.  After I select multiple times then it merges.  On Windows 98 with Word 2000 I only select the data source once in my app and then it merges.  If you have any ideas on how to get rid of that problem, please let me know.  Thank you very much for your time.
Russ
0
 
LVL 32

Expert Comment

by:bhess1
ID: 2690635
Can you show me the appropriate code?

BTW, you can check the app version in your code, and conditionally execute the 're-select' if the version of Word is Word97:

If Val(wrdApp.Version) < 9   ' check version # for Word2000 - I think it's 9
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA error replacing data 6 40
VBS file using code from 2nd file (txt or vbs) 4 37
Using "ScreenUpdating" 6 66
VB6 ListBox Question 4 44
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

832 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