Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Object Library References

I have Excel files that are used by people with different
version of MS Office. These files create an Outlook object
and send emails.

The issue is, when a person with Outlook 2002 uses the
file, Excel is smart enough to switch to the Microsoft
Office 10.0 Object Library. However, next next person with
Outlook 2000 receives compile errors when the Excel code
runs. When I look at the references, it shows, MISSING
Microsoft Office 10.0 Object Library. I have to uncheck
that and recheck Microsoft Office 9.0 Object Library.

Is there anyway to handle this with code?

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

Nelson,

use late binding.

Here's a link to an Outlook example of converting from early to late binding
that I gave earlier this year

http://tinyurl.com/yhls

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Nelson" wrote in message
...
I have Excel files that are used by people with different
version of MS Office. These files create an Outlook object
and send emails.

The issue is, when a person with Outlook 2002 uses the
file, Excel is smart enough to switch to the Microsoft
Office 10.0 Object Library. However, next next person with
Outlook 2000 receives compile errors when the Excel code
runs. When I look at the references, it shows, MISSING
Microsoft Office 10.0 Object Library. I have to uncheck
that and recheck Microsoft Office 9.0 Object Library.

Is there anyway to handle this with code?

TIA
Nelson



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Object Library References

Hi Nelson

... Excel is smart enough to switch to the Microsoft
Office 10.0 Object Library.


.... and after all this she's stupid enough to actually save the upgrade for all later
users, yes that goes for ADO and other references too. Bob's right as far as I know, you
can't handle this without removing the references and create late binding by code. This
posting just to add another resource, Dick Kusleika's page
http://www.dicks-clicks.com/excel/olAutomating.htm

--
HTH. Best wishes Harald
Followup to newsgroup only please.

"Nelson" wrote in message
...
I have Excel files that are used by people with different
version of MS Office. These files create an Outlook object
and send emails.

The issue is, when a person with Outlook 2002 uses the
file, Excel is smart enough to switch to the Microsoft
Office 10.0 Object Library. However, next next person with
Outlook 2000 receives compile errors when the Excel code
runs. When I look at the references, it shows, MISSING
Microsoft Office 10.0 Object Library. I have to uncheck
that and recheck Microsoft Office 9.0 Object Library.

Is there anyway to handle this with code?

TIA
Nelson



  #4   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Object Library References

I copied the code from the url you provided. Having
problems:

If remove the Outlook reference, I get a compile error
User Defined Type not Defined on
Set objOutlook = New Outlook.Application
If I keep the Outlook reference I get a syntax error
on Set objRecipient.add("Hicks, Nelson")


-----Original Message-----
Nelson,

use late binding.

Here's a link to an Outlook example of converting from

early to late binding
that I gave earlier this year

http://tinyurl.com/yhls

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Nelson" wrote in

message
...
I have Excel files that are used by people with

different
version of MS Office. These files create an Outlook

object
and send emails.

The issue is, when a person with Outlook 2002 uses the
file, Excel is smart enough to switch to the Microsoft
Office 10.0 Object Library. However, next next person

with
Outlook 2000 receives compile errors when the Excel code
runs. When I look at the references, it shows, MISSING
Microsoft Office 10.0 Object Library. I have to uncheck
that and recheck Microsoft Office 9.0 Object Library.

Is there anyway to handle this with code?

TIA
Nelson



.

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

Nelson,

The final version should use Create not

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

wrote in message
...
I copied the code from the url you provided. Having
problems:

If remove the Outlook reference, I get a compile error
User Defined Type not Defined on
Set objOutlook = New Outlook.Application
If I keep the Outlook reference I get a syntax error
on Set objRecipient.add("Hicks, Nelson")


-----Original Message-----
Nelson,

use late binding.

Here's a link to an Outlook example of converting from

early to late binding
that I gave earlier this year

http://tinyurl.com/yhls

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Nelson" wrote in

message
...
I have Excel files that are used by people with

different
version of MS Office. These files create an Outlook

object
and send emails.

The issue is, when a person with Outlook 2002 uses the
file, Excel is smart enough to switch to the Microsoft
Office 10.0 Object Library. However, next next person

with
Outlook 2000 receives compile errors when the Excel code
runs. When I look at the references, it shows, MISSING
Microsoft Office 10.0 Object Library. I have to uncheck
that and recheck Microsoft Office 9.0 Object Library.

Is there anyway to handle this with code?

TIA
Nelson



.





  #6   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Object Library References

Thanks, made 2 changes.
Set objOutlook = CreateObject("Outlook.Application")
Set objRecipient = objMailItem.Recipients.Add("Last,
First")

-----Original Message-----
Nelson,

The final version should use Create not

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

wrote in message
...
I copied the code from the url you provided. Having
problems:

If remove the Outlook reference, I get a compile error
User Defined Type not Defined on
Set objOutlook = New Outlook.Application
If I keep the Outlook reference I get a syntax error
on Set objRecipient.add("Hicks, Nelson")


-----Original Message-----
Nelson,

use late binding.

Here's a link to an Outlook example of converting from

early to late binding
that I gave earlier this year

http://tinyurl.com/yhls

--

HTH

Bob Phillips
... looking out across Poole Harbour to the

Purbecks
(remove nothere from the email address if mailing

direct)

"Nelson" wrote in

message
...
I have Excel files that are used by people with

different
version of MS Office. These files create an Outlook

object
and send emails.

The issue is, when a person with Outlook 2002 uses

the
file, Excel is smart enough to switch to the

Microsoft
Office 10.0 Object Library. However, next next person

with
Outlook 2000 receives compile errors when the Excel

code
runs. When I look at the references, it shows,

MISSING
Microsoft Office 10.0 Object Library. I have to

uncheck
that and recheck Microsoft Office 9.0 Object Library.

Is there anyway to handle this with code?

TIA
Nelson


.



.

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
Help with Object Library Ayo Setting up and Configuration of Excel 1 November 6th 09 08:04 PM
missing object library eagle7 Excel Discussion (Misc queries) 2 November 6th 05 04:06 AM
Object library missing Nigel Excel Discussion (Misc queries) 1 May 5th 05 05:46 PM
Problem with the Excel 10.0 Object Library MattEdwards Excel Programming 4 December 9th 03 12:37 AM
'Object library not registered' in Excel97 Humberto Excel Programming 3 August 11th 03 02:41 PM


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

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

About Us

"It's about Microsoft Excel"