Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Problem doing a Mail Merge with Word 97 in Windows 95

Posted on 2000-04-06
4
Medium Priority
?
166 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
[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
  • 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:
Brendt Hess earned 400 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:Brendt Hess
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

670 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