Microsoft Word X.0 Object Library

  • Thread starter Thread starter Ian Mangelsdorf
  • Start date Start date
I

Ian Mangelsdorf

Hi all

Is there a way to ensure the Microsoft Word X.0 Object Library is
selected for a given version of Office. Im using Excel 2003 and would
like to have my application freindly with all versions of word. Im
finding If i load it onto another machine wioth say XP tehn the object
library isnt selected and I get errors

Cheers

Ian
 
Hi Ian,

Use late-binding

Set wordApp = CreateObject("Word.Application")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
If You prefer to use early binding then You need to set the reference t
the earliest version of MS Word You intend to use.

Excel will automatically adjust the reference to later availabl
version of the type library.

Kind regards,
Denni
 
OR via code

Sub MakeLibrary_Word()
On Error Resume Next
ThisWorkbook.VBProject.References.AddFromGuid _
"{00020905-0000-0000-C000-000000000046}", 8, 0
End Sub

which should reference what ever version was last Installed ie the lastest
version for that machine...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top