#1   Report Post  
Posted to microsoft.public.excel.programming
Tom Tom is offline
external usenet poster
 
Posts: 25
Default References.

Hello,

I am using Office 2003 and I create some macro in excel. In this macro I am
using word application:

Set oWRDapp = CreateObject("WORD.Application")
Set oWRDdoc = oWRDapp.Documents
oWRDdoc.Add DocumentType:=0
....

Excel automaticly add refernces to "Microsoft Word 11.0 Object Libary". But
when I run this macro on computer where is install Office 2002 it dosnt work
because macro looking for Office 11. So i have to manualy change references
from Office10 to 10.

Do you know how can I correct this. Its possible do this change by macro?
Somethnig like:

if install office 2002 then referneces = Office10
if install office 2003 then referneces = Office11

Thanks Tom


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default References.

Dim oWRDapp As Object


Set oWRDapp = CreateObject("WORD.Application")
Set oWRDdoc = oWRDapp.Documents
oWRDdoc.Add DocumentType:=0

and remove the refernce to Word, OR

develop code on the lower version of Excel

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Tom" wrote in message
...
Hello,

I am using Office 2003 and I create some macro in excel. In this macro I

am
using word application:

Set oWRDapp = CreateObject("WORD.Application")
Set oWRDdoc = oWRDapp.Documents
oWRDdoc.Add DocumentType:=0
....

Excel automaticly add refernces to "Microsoft Word 11.0 Object Libary".

But
when I run this macro on computer where is install Office 2002 it dosnt

work
because macro looking for Office 11. So i have to manualy change

references
from Office10 to 10.

Do you know how can I correct this. Its possible do this change by macro?
Somethnig like:

if install office 2002 then referneces = Office10
if install office 2003 then referneces = Office11

Thanks Tom




  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Tom is offline
external usenet poster
 
Posts: 25
Default References.

Thanks,
and how can I remove the refernce ?

Tom

"Bob Phillips" wrote in message
...
Dim oWRDapp As Object


Set oWRDapp = CreateObject("WORD.Application")
Set oWRDdoc = oWRDapp.Documents
oWRDdoc.Add DocumentType:=0

and remove the refernce to Word, OR

develop code on the lower version of Excel

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Tom" wrote in message
...
Hello,

I am using Office 2003 and I create some macro in excel. In this macro I

am
using word application:

Set oWRDapp = CreateObject("WORD.Application")
Set oWRDdoc = oWRDapp.Documents
oWRDdoc.Add DocumentType:=0
....

Excel automaticly add refernces to "Microsoft Word 11.0 Object Libary".

But
when I run this macro on computer where is install Office 2002 it dosnt

work
because macro looking for Office 11. So i have to manualy change

references
from Office10 to 10.

Do you know how can I correct this. Its possible do this change by macro?
Somethnig like:

if install office 2002 then referneces = Office10
if install office 2003 then referneces = Office11

Thanks Tom






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default References.

Go into ToolsReferences in the VBE, and uncheck that item.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Tom" wrote in message
...
Thanks,
and how can I remove the refernce ?

Tom

"Bob Phillips" wrote in message
...
Dim oWRDapp As Object


Set oWRDapp = CreateObject("WORD.Application")
Set oWRDdoc = oWRDapp.Documents
oWRDdoc.Add DocumentType:=0

and remove the refernce to Word, OR

develop code on the lower version of Excel

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Tom" wrote in message
...
Hello,

I am using Office 2003 and I create some macro in excel. In this macro

I
am
using word application:

Set oWRDapp = CreateObject("WORD.Application")
Set oWRDdoc = oWRDapp.Documents
oWRDdoc.Add DocumentType:=0
....

Excel automaticly add refernces to "Microsoft Word 11.0 Object Libary".

But
when I run this macro on computer where is install Office 2002 it dosnt

work
because macro looking for Office 11. So i have to manualy change

references
from Office10 to 10.

Do you know how can I correct this. Its possible do this change by

macro?
Somethnig like:

if install office 2002 then referneces = Office10
if install office 2003 then referneces = Office11

Thanks Tom








  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Tom is offline
external usenet poster
 
Posts: 25
Default References.

Yes I know this. But how can I add references?
This dobt do it:
Set oWRDapp = CreateObject("WORD.Application")
Set oWRDdoc = oWRDapp.Documents
oWRDdoc.Add DocumentType:=0


I have to do it manualy in refences tab.

tom




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default References.

What? You asked how to remove a reference not add it.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Tom" wrote in message
...
Yes I know this. But how can I add references?
This dobt do it:
Set oWRDapp = CreateObject("WORD.Application")
Set oWRDdoc = oWRDapp.Documents
oWRDdoc.Add DocumentType:=0


I have to do it manualy in refences tab.

tom




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert all 3d references to normal references in a workboo Dima Excel Discussion (Misc queries) 6 August 8th 08 12:38 PM
How to convert all 3d references to normal references in a workboo Dima Excel Worksheet Functions 6 August 8th 08 12:38 PM
Help with converting a block of cells with Absolute and mixed references to relative references Vulcan Excel Worksheet Functions 3 December 13th 07 11:43 PM
How to rename references from range names to cell references Abbas Excel Discussion (Misc queries) 1 May 24th 06 06:18 PM
Tools | References - information about references L Mehl Excel Programming 6 July 4th 04 06:28 PM


All times are GMT +1. The time now is 06:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"