Avatar of MKadric
 asked on

MS WORD 2010 and 2003 both installed on computer

I use the code below to open a word dot file which the dot file is associated with 2003.  Which is what I want to open with, but 2010 keeps opening... I need to make sure 2003 always opens with the code below..

Public obj As Word.Application
Public wdApp As Word.Application
Public wdDoc As Word.Document      

      Set wdApp = CreateObject("word.application")
            Set wdDoc = wdApp.Documents.Open(strFilename)
            wdApp.Visible = True
            wdApp.WindowState = wdWindowStateNormal
            wdDoc.SaveAs strFilename
            objRecSet.Fields("Document Path") = strFilename

Microsoft WordProgramming Languages-OtherVisual Basic Classic

Avatar of undefined
Last Comment

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

Is there a way to test for  Word.Application.11. Word.Application.10 amd so on... Because now with the statment above a get a run time error because I do not have 2003 installed

I don't know of one. I suggest that you trap the error.

Worked like a charm... Thanks
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy