|
|
I have some code I use to create a mail message in Outlook 2003 from Access as follows:
Dim objOutlook As Outlook.Application Set objOutlook = New Outlook.Application etc....
The code works fine everywhere except on one computer. On that computer, the user gets Error -2147024770: "Automation error. The specified module could not be found." at the Set objOutlook line.
I did some searching online, and I found that most of the time when people got that message, it was because a DLL wasn't registered. So I looked up the reference (in Access 2003) to "Microsoft Outlook 11.0 Object Library," and it referred to msoutl.olb. However, that OLB file can't be registered, because it's not an OCX or DLL.
So, any thoughts about what needs to be done here?
Thanks!
Neil
|
|
I had this problem once and just deleted the reference to this file in my database. If that does not work just delete the reference to this file on the PC's that give trouble and add a new reference to the object library that does exist on those PC's (for example: Microsoft Outlook 10.0 Object Library).
-- Gerwin Berentschot gerwin[ at ]mraccess.nl.(nospam) www.mraccess.nl
"Neil" wrote:
[Quoted Text] > I have some code I use to create a mail message in Outlook 2003 from Access > as follows: > > Dim objOutlook As Outlook.Application > Set objOutlook = New Outlook.Application > etc.... > > The code works fine everywhere except on one computer. On that computer, the > user gets Error -2147024770: "Automation error. The specified module could > not be found." at the Set objOutlook line. > > I did some searching online, and I found that most of the time when people > got that message, it was because a DLL wasn't registered. So I looked up the > reference (in Access 2003) to "Microsoft Outlook 11.0 Object Library," and > it referred to msoutl.olb. However, that OLB file can't be registered, > because it's not an OCX or DLL. > > So, any thoughts about what needs to be done here? > > Thanks! > > Neil > > >
|
|
Hi
This problem has been reported several times in this forum and, as yet, there hasn't been a satisfactory explanation/resolution.
A work around is to use the GetObject funtion which works so long as Outlook is open.
Use:
Set objOutlook = GetObject(, "Outlook.Application")
Good luck.
BW
"Neil" wrote:
[Quoted Text] > I have some code I use to create a mail message in Outlook 2003 from Access > as follows: > > Dim objOutlook As Outlook.Application > Set objOutlook = New Outlook.Application > etc.... > > The code works fine everywhere except on one computer. On that computer, the > user gets Error -2147024770: "Automation error. The specified module could > not be found." at the Set objOutlook line. > > I did some searching online, and I found that most of the time when people > got that message, it was because a DLL wasn't registered. So I looked up the > reference (in Access 2003) to "Microsoft Outlook 11.0 Object Library," and > it referred to msoutl.olb. However, that OLB file can't be registered, > because it's not an OCX or DLL. > > So, any thoughts about what needs to be done here? > > Thanks! > > Neil > > >
|
|
Good thought, but I'm not sure that's it. Went into Excel and copied my routine there, creating a brand new reference to the Microsoft Outlook 11.0 Object Library in the Excel module and ran the code. Same problem. Did the same on another machine, and it worked fine.
So, somewhere, I think, a DLL isn't registered. Just don't know which one it is.
Thanks,
Neil
"Gerwin Berentschot" <gerwin[ at ]mraccess.nl.(nospam)> wrote in message news:4F9B529C-639B-4481-99C2-EF40ECAEF7DB[ at ]microsoft.com...
[Quoted Text] >I had this problem once and just deleted the reference to this file in my > database. If that does not work just delete the reference to this file on > the > PC's that give trouble and add a new reference to the object library that > does exist on those PC's (for example: Microsoft Outlook 10.0 Object > Library). > > -- > Gerwin Berentschot > gerwin[ at ]mraccess.nl.(nospam) > www.mraccess.nl > > > > "Neil" wrote: > >> I have some code I use to create a mail message in Outlook 2003 from >> Access >> as follows: >> >> Dim objOutlook As Outlook.Application >> Set objOutlook = New Outlook.Application >> etc.... >> >> The code works fine everywhere except on one computer. On that computer, >> the >> user gets Error -2147024770: "Automation error. The specified module >> could >> not be found." at the Set objOutlook line. >> >> I did some searching online, and I found that most of the time when >> people >> got that message, it was because a DLL wasn't registered. So I looked up >> the >> reference (in Access 2003) to "Microsoft Outlook 11.0 Object Library," >> and >> it referred to msoutl.olb. However, that OLB file can't be registered, >> because it's not an OCX or DLL. >> >> So, any thoughts about what needs to be done here? >> >> Thanks! >> >> Neil >> >> >>
|
|
It's been reported that it only happens on certain machines? As noted, I'm running this code on at least 30-40 machines, all without problem. This is the only machine that's having the problem.
So, these people who are having the problem, is it the same with them, where it works on some machines but not others?
Thanks,
Neil
"BeWyched" <BeWyched[ at ]discussions.microsoft.com> wrote in message news:1CF205D6-5233-421B-9164-57A5613E063F[ at ]microsoft.com...
[Quoted Text] > Hi > > This problem has been reported several times in this forum and, as yet, > there hasn't been a satisfactory explanation/resolution. > > A work around is to use the GetObject funtion which works so long as > Outlook > is open. > > Use: > > Set objOutlook = GetObject(, "Outlook.Application") > > Good luck. > > BW > > "Neil" wrote: > >> I have some code I use to create a mail message in Outlook 2003 from >> Access >> as follows: >> >> Dim objOutlook As Outlook.Application >> Set objOutlook = New Outlook.Application >> etc.... >> >> The code works fine everywhere except on one computer. On that computer, >> the >> user gets Error -2147024770: "Automation error. The specified module >> could >> not be found." at the Set objOutlook line. >> >> I did some searching online, and I found that most of the time when >> people >> got that message, it was because a DLL wasn't registered. So I looked up >> the >> reference (in Access 2003) to "Microsoft Outlook 11.0 Object Library," >> and >> it referred to msoutl.olb. However, that OLB file can't be registered, >> because it's not an OCX or DLL. >> >> So, any thoughts about what needs to be done here? >> >> Thanks! >> >> Neil >> >> >>
|
|
Hi Neil
I have this problem and it is machine specific. I've compared everything I can think of but still can't ascertain why it works on some PC's and not others.
I'm not sure about the other postings - I found them when I was trying to resolve my problem but don't seeem to be able to find them again!
I'm still trying to sort my problem and will let you know if I find anything positive.
BW
"Neil" wrote:
[Quoted Text] > It's been reported that it only happens on certain machines? As noted, I'm > running this code on at least 30-40 machines, all without problem. This is > the only machine that's having the problem. > > So, these people who are having the problem, is it the same with them, where > it works on some machines but not others? > > Thanks, > > Neil > > > "BeWyched" <BeWyched[ at ]discussions.microsoft.com> wrote in message > news:1CF205D6-5233-421B-9164-57A5613E063F[ at ]microsoft.com... > > Hi > > > > This problem has been reported several times in this forum and, as yet, > > there hasn't been a satisfactory explanation/resolution. > > > > A work around is to use the GetObject funtion which works so long as > > Outlook > > is open. > > > > Use: > > > > Set objOutlook = GetObject(, "Outlook.Application") > > > > Good luck. > > > > BW > > > > "Neil" wrote: > > > >> I have some code I use to create a mail message in Outlook 2003 from > >> Access > >> as follows: > >> > >> Dim objOutlook As Outlook.Application > >> Set objOutlook = New Outlook.Application > >> etc.... > >> > >> The code works fine everywhere except on one computer. On that computer, > >> the > >> user gets Error -2147024770: "Automation error. The specified module > >> could > >> not be found." at the Set objOutlook line. > >> > >> I did some searching online, and I found that most of the time when > >> people > >> got that message, it was because a DLL wasn't registered. So I looked up > >> the > >> reference (in Access 2003) to "Microsoft Outlook 11.0 Object Library," > >> and > >> it referred to msoutl.olb. However, that OLB file can't be registered, > >> because it's not an OCX or DLL. > >> > >> So, any thoughts about what needs to be done here? > >> > >> Thanks! > >> > >> Neil > >> > >> > >> > > >
|
|
You are not alone, I too have this problem and I have spent hours on the clients site trying to figure it out to no avail. I am keeping my eyes pinned to this posting hoping someone can give some insight.
-- Gina Whipp
"I feel I have been denied critical, need to know, information!" - Tremors II
"Neil" <nospam[ at ]nospam.net> wrote in message news:nRjmh.5510$pQ3.5374[ at ]newsread4.news.pas.earthlink.net...
[Quoted Text] > It's been reported that it only happens on certain machines? As noted, I'm > running this code on at least 30-40 machines, all without problem. This is > the only machine that's having the problem. > > So, these people who are having the problem, is it the same with them, > where it works on some machines but not others? > > Thanks, > > Neil > > > "BeWyched" <BeWyched[ at ]discussions.microsoft.com> wrote in message > news:1CF205D6-5233-421B-9164-57A5613E063F[ at ]microsoft.com... >> Hi >> >> This problem has been reported several times in this forum and, as yet, >> there hasn't been a satisfactory explanation/resolution. >> >> A work around is to use the GetObject funtion which works so long as >> Outlook >> is open. >> >> Use: >> >> Set objOutlook = GetObject(, "Outlook.Application") >> >> Good luck. >> >> BW >> >> "Neil" wrote: >> >>> I have some code I use to create a mail message in Outlook 2003 from >>> Access >>> as follows: >>> >>> Dim objOutlook As Outlook.Application >>> Set objOutlook = New Outlook.Application >>> etc.... >>> >>> The code works fine everywhere except on one computer. On that computer, >>> the >>> user gets Error -2147024770: "Automation error. The specified module >>> could >>> not be found." at the Set objOutlook line. >>> >>> I did some searching online, and I found that most of the time when >>> people >>> got that message, it was because a DLL wasn't registered. So I looked up >>> the >>> reference (in Access 2003) to "Microsoft Outlook 11.0 Object Library," >>> and >>> it referred to msoutl.olb. However, that OLB file can't be registered, >>> because it's not an OCX or DLL. >>> >>> So, any thoughts about what needs to be done here? >>> >>> Thanks! >>> >>> Neil >>> >>> >>> > >
|
|
"Gina Whipp" <NotInterested[ at ]InViruses.com> wrote in message news:%23a$4OznLHHA.3552[ at ]TK2MSFTNGP03.phx.gbl...
[Quoted Text] > You are not alone, I too have this problem and I have spent hours on the > clients site trying to figure it out to no avail. I am keeping my eyes pinned > to this posting hoping someone can give some insight.
My advice is that for an application that is to be deployed on multiple machines ZERO references should be added beyond the default ones. All other external library calls should be done with late binding which does not require a reference be added to the project.
Using late binding you eliminate code failures that are specifically caused by a missing reference and you can just focus on what doesn't work. The only time I have seen a late binding call to Outlook to not work I fixed it by doing a repair of Office on that PC.
-- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com
|
|
Rick,
I did the late binding first, still did not work but doing a repair of Office, now I didn't try that! I guess I'll be going to the Client's site.
-- Gina Whipp
"I feel I have been denied critical, need to know, information!" - Tremors II
"Rick Brandt" <rickbrandt2[ at ]hotmail.com> wrote in message news:PLumh.1695$ji1.1049[ at ]newssvr12.news.prodigy.net...
[Quoted Text] > "Gina Whipp" <NotInterested[ at ]InViruses.com> wrote in message > news:%23a$4OznLHHA.3552[ at ]TK2MSFTNGP03.phx.gbl... >> You are not alone, I too have this problem and I have spent hours on the >> clients site trying to figure it out to no avail. I am keeping my eyes >> pinned to this posting hoping someone can give some insight. > > My advice is that for an application that is to be deployed on multiple > machines ZERO references should be added beyond the default ones. All > other external library calls should be done with late binding which does > not require a reference be added to the project. > > Using late binding you eliminate code failures that are specifically > caused by a missing reference and you can just focus on what doesn't work. > The only time I have seen a late binding call to Outlook to not work I > fixed it by doing a repair of Office on that PC. > > -- > Rick Brandt, Microsoft Access MVP > Email (as appropriate) to... > RBrandt at Hunter dot com >
|
|
Thanks Rick.
I've tried using late binding and repairing Office to no avail. Previous postings from others also confirms that late binding does not resolve the problem.
BW
"Rick Brandt" wrote:
[Quoted Text] > "Gina Whipp" <NotInterested[ at ]InViruses.com> wrote in message > news:%23a$4OznLHHA.3552[ at ]TK2MSFTNGP03.phx.gbl... > > You are not alone, I too have this problem and I have spent hours on the > > clients site trying to figure it out to no avail. I am keeping my eyes pinned > > to this posting hoping someone can give some insight. > > My advice is that for an application that is to be deployed on multiple machines > ZERO references should be added beyond the default ones. All other external > library calls should be done with late binding which does not require a > reference be added to the project. > > Using late binding you eliminate code failures that are specifically caused by a > missing reference and you can just focus on what doesn't work. The only time I > have seen a late binding call to Outlook to not work I fixed it by doing a > repair of Office on that PC. > > -- > Rick Brandt, Microsoft Access MVP > Email (as appropriate) to... > RBrandt at Hunter dot com > > >
|
|
"BeWyched" <BeWyched[ at ]discussions.microsoft.com> wrote in message news:18B812EB-E1A6-4EB9-83F3-14847F26B420[ at ]microsoft.com...
[Quoted Text] > Thanks Rick. > > I've tried using late binding and repairing Office to no avail. Previous > postings from others also confirms that late binding does not resolve the > problem.
I did not state that late binding would solve the problem. Only that when using early binding you can experience errors that have nothing to do with the actual problem which can make finding and correcting the actual problem much more difficult.
-- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com
|
|
I've just tried something and its worked (at long last)!!
Try adding the Server name into the CreateObject function with late binding. Try:
Dim objOutlook Set objOutlook = CreateObject("Outlook.Application", "LocalHost")
Good luck!
BW
"Gina Whipp" wrote:
[Quoted Text] > Rick, > > I did the late binding first, still did not work but doing a repair of > Office, now I didn't try that! I guess I'll be going to the Client's site. > > -- > Gina Whipp > > "I feel I have been denied critical, need to know, information!" - Tremors > II > > > "Rick Brandt" <rickbrandt2[ at ]hotmail.com> wrote in message > news:PLumh.1695$ji1.1049[ at ]newssvr12.news.prodigy.net... > > "Gina Whipp" <NotInterested[ at ]InViruses.com> wrote in message > > news:%23a$4OznLHHA.3552[ at ]TK2MSFTNGP03.phx.gbl... > >> You are not alone, I too have this problem and I have spent hours on the > >> clients site trying to figure it out to no avail. I am keeping my eyes > >> pinned to this posting hoping someone can give some insight. > > > > My advice is that for an application that is to be deployed on multiple > > machines ZERO references should be added beyond the default ones. All > > other external library calls should be done with late binding which does > > not require a reference be added to the project. > > > > Using late binding you eliminate code failures that are specifically > > caused by a missing reference and you can just focus on what doesn't work. > > The only time I have seen a late binding call to Outlook to not work I > > fixed it by doing a repair of Office on that PC. > > > > -- > > Rick Brandt, Microsoft Access MVP > > Email (as appropriate) to... > > RBrandt at Hunter dot com > > > > >
|
|
Did you try uninstalling and reinstalling Outlook? I'm about to do that, but if you tried it and it didn't change anything, then I won't bother.
Thanks,
Neil
"BeWyched" <BeWyched[ at ]discussions.microsoft.com> wrote in message news:AB8574A8-65BD-414E-9D6A-446F411F2B99[ at ]microsoft.com...
[Quoted Text] > Hi Neil > > I have this problem and it is machine specific. I've compared everything I > can think of but still can't ascertain why it works on some PC's and not > others. > > I'm not sure about the other postings - I found them when I was trying to > resolve my problem but don't seeem to be able to find them again! > > I'm still trying to sort my problem and will let you know if I find > anything > positive. > > BW > > > "Neil" wrote: > >> It's been reported that it only happens on certain machines? As noted, >> I'm >> running this code on at least 30-40 machines, all without problem. This >> is >> the only machine that's having the problem. >> >> So, these people who are having the problem, is it the same with them, >> where >> it works on some machines but not others? >> >> Thanks, >> >> Neil >> >> >> "BeWyched" <BeWyched[ at ]discussions.microsoft.com> wrote in message >> news:1CF205D6-5233-421B-9164-57A5613E063F[ at ]microsoft.com... >> > Hi >> > >> > This problem has been reported several times in this forum and, as yet, >> > there hasn't been a satisfactory explanation/resolution. >> > >> > A work around is to use the GetObject funtion which works so long as >> > Outlook >> > is open. >> > >> > Use: >> > >> > Set objOutlook = GetObject(, "Outlook.Application") >> > >> > Good luck. >> > >> > BW >> > >> > "Neil" wrote: >> > >> >> I have some code I use to create a mail message in Outlook 2003 from >> >> Access >> >> as follows: >> >> >> >> Dim objOutlook As Outlook.Application >> >> Set objOutlook = New Outlook.Application >> >> etc.... >> >> >> >> The code works fine everywhere except on one computer. On that >> >> computer, >> >> the >> >> user gets Error -2147024770: "Automation error. The specified module >> >> could >> >> not be found." at the Set objOutlook line. >> >> >> >> I did some searching online, and I found that most of the time when >> >> people >> >> got that message, it was because a DLL wasn't registered. So I looked >> >> up >> >> the >> >> reference (in Access 2003) to "Microsoft Outlook 11.0 Object Library," >> >> and >> >> it referred to msoutl.olb. However, that OLB file can't be registered, >> >> because it's not an OCX or DLL. >> >> >> >> So, any thoughts about what needs to be done here? >> >> >> >> Thanks! >> >> >> >> Neil >> >> >> >> >> >> >> >> >>
|
|
Wow, great! I'll definitely give it a try. Thanks!
"BeWyched" <BeWyched[ at ]discussions.microsoft.com> wrote in message news:D255FC84-6E75-47BA-9498-70555895CB68[ at ]microsoft.com...
[Quoted Text] > I've just tried something and its worked (at long last)!! > > Try adding the Server name into the CreateObject function with late > binding. > Try: > > Dim objOutlook > Set objOutlook = CreateObject("Outlook.Application", "LocalHost") > > Good luck! > > BW > > > "Gina Whipp" wrote: > >> Rick, >> >> I did the late binding first, still did not work but doing a repair of >> Office, now I didn't try that! I guess I'll be going to the Client's >> site. >> >> -- >> Gina Whipp >> >> "I feel I have been denied critical, need to know, information!" - >> Tremors >> II >> >> >> "Rick Brandt" <rickbrandt2[ at ]hotmail.com> wrote in message >> news:PLumh.1695$ji1.1049[ at ]newssvr12.news.prodigy.net... >> > "Gina Whipp" <NotInterested[ at ]InViruses.com> wrote in message >> > news:%23a$4OznLHHA.3552[ at ]TK2MSFTNGP03.phx.gbl... >> >> You are not alone, I too have this problem and I have spent hours on >> >> the >> >> clients site trying to figure it out to no avail. I am keeping my >> >> eyes >> >> pinned to this posting hoping someone can give some insight. >> > >> > My advice is that for an application that is to be deployed on multiple >> > machines ZERO references should be added beyond the default ones. All >> > other external library calls should be done with late binding which >> > does >> > not require a reference be added to the project. >> > >> > Using late binding you eliminate code failures that are specifically >> > caused by a missing reference and you can just focus on what doesn't >> > work. >> > The only time I have seen a late binding call to Outlook to not work I >> > fixed it by doing a repair of Office on that PC. >> > >> > -- >> > Rick Brandt, Microsoft Access MVP >> > Email (as appropriate) to... >> > RBrandt at Hunter dot com >> > >> >> >>
|
|
Well, I tried it and it resolved the problem here, too. So, thanks!! Amazing, though, about this: why wasn't this known/used before?...
"BeWyched" <BeWyched[ at ]discussions.microsoft.com> wrote in message news:D255FC84-6E75-47BA-9498-70555895CB68[ at ]microsoft.com...
[Quoted Text] > I've just tried something and its worked (at long last)!! > > Try adding the Server name into the CreateObject function with late > binding. > Try: > > Dim objOutlook > Set objOutlook = CreateObject("Outlook.Application", "LocalHost") > > Good luck! > > BW > > > "Gina Whipp" wrote: > >> Rick, >> >> I did the late binding first, still did not work but doing a repair of >> Office, now I didn't try that! I guess I'll be going to the Client's >> site. >> >> -- >> Gina Whipp >> >> "I feel I have been denied critical, need to know, information!" - >> Tremors >> II >> >> >> "Rick Brandt" <rickbrandt2[ at ]hotmail.com> wrote in message >> news:PLumh.1695$ji1.1049[ at ]newssvr12.news.prodigy.net... >> > "Gina Whipp" <NotInterested[ at ]InViruses.com> wrote in message >> > news:%23a$4OznLHHA.3552[ at ]TK2MSFTNGP03.phx.gbl... >> >> You are not alone, I too have this problem and I have spent hours on >> >> the >> >> clients site trying to figure it out to no avail. I am keeping my >> >> eyes >> >> pinned to this posting hoping someone can give some insight. >> > >> > My advice is that for an application that is to be deployed on multiple >> > machines ZERO references should be added beyond the default ones. All >> > other external library calls should be done with late binding which >> > does >> > not require a reference be added to the project. >> > >> > Using late binding you eliminate code failures that are specifically >> > caused by a missing reference and you can just focus on what doesn't >> > work. >> > The only time I have seen a late binding call to Outlook to not work I >> > fixed it by doing a repair of Office on that PC. >> > >> > -- >> > Rick Brandt, Microsoft Access MVP >> > Email (as appropriate) to... >> > RBrandt at Hunter dot com >> > >> >> >>
|
|
I'm delighted!!
The problem clearly is that VBA isn't recognising the local server when the 2nd parameter of CreateObject is left out. It should!
As you say, why hasn't this been identified before. Perhaps, there has been a recent Windows fix which has changed how the local server info. is stored? I'm also concious that my PC (on which I have the problem) runs several other server applications (IIS, SQL, Project etc.), is networked locally to other servers and has a remote access link to yet another server. I wonder if, somewhere deep in the bowels of Windows, VBA has confused itself over what/where the default server is. By adding 'localhost' as the 2nd parameter we have forced it to its senses. Anyway, it works! Have a great New Year.
BW
"Neil" wrote:
[Quoted Text] > Well, I tried it and it resolved the problem here, too. So, thanks!! > Amazing, though, about this: why wasn't this known/used before?... > > > "BeWyched" <BeWyched[ at ]discussions.microsoft.com> wrote in message > news:D255FC84-6E75-47BA-9498-70555895CB68[ at ]microsoft.com... > > I've just tried something and its worked (at long last)!! > > > > Try adding the Server name into the CreateObject function with late > > binding. > > Try: > > > > Dim objOutlook > > Set objOutlook = CreateObject("Outlook.Application", "LocalHost") > > > > Good luck! > > > > BW > > > > > > "Gina Whipp" wrote: > > > >> Rick, > >> > >> I did the late binding first, still did not work but doing a repair of > >> Office, now I didn't try that! I guess I'll be going to the Client's > >> site. > >> > >> -- > >> Gina Whipp > >> > >> "I feel I have been denied critical, need to know, information!" - > >> Tremors > >> II > >> > >> > >> "Rick Brandt" <rickbrandt2[ at ]hotmail.com> wrote in message > >> news:PLumh.1695$ji1.1049[ at ]newssvr12.news.prodigy.net... > >> > "Gina Whipp" <NotInterested[ at ]InViruses.com> wrote in message > >> > news:%23a$4OznLHHA.3552[ at ]TK2MSFTNGP03.phx.gbl... > >> >> You are not alone, I too have this problem and I have spent hours on > >> >> the > >> >> clients site trying to figure it out to no avail. I am keeping my > >> >> eyes > >> >> pinned to this posting hoping someone can give some insight. > >> > > >> > My advice is that for an application that is to be deployed on multiple > >> > machines ZERO references should be added beyond the default ones. All > >> > other external library calls should be done with late binding which > >> > does > >> > not require a reference be added to the project. > >> > > >> > Using late binding you eliminate code failures that are specifically > >> > caused by a missing reference and you can just focus on what doesn't > >> > work. > >> > The only time I have seen a late binding call to Outlook to not work I > >> > fixed it by doing a repair of Office on that PC. > >> > > >> > -- > >> > Rick Brandt, Microsoft Access MVP > >> > Email (as appropriate) to... > >> > RBrandt at Hunter dot com > >> > > >> > >> > >> > > >
|
|
Just FYI, the person whose machine had the problem uninstalled and reinstalled office, and now his machine works with the original code (without the "LocalHost" parameter). So that's interesting. I left the parameter in, anyway, since it doesn't hurt anything.
Neil
"BeWyched" <BeWyched[ at ]discussions.microsoft.com> wrote in message news:130AC8CB-9716-4A83-BFD3-DE9181F3C50A[ at ]microsoft.com...
[Quoted Text] > I'm delighted!! > > The problem clearly is that VBA isn't recognising the local server when > the > 2nd parameter of CreateObject is left out. It should! > > As you say, why hasn't this been identified before. Perhaps, there has > been > a recent Windows fix which has changed how the local server info. is > stored? > I'm also concious that my PC (on which I have the problem) runs several > other > server applications (IIS, SQL, Project etc.), is networked locally to > other > servers and has a remote access link to yet another server. I wonder if, > somewhere deep in the bowels of Windows, VBA has confused itself over > what/where the default server is. By adding 'localhost' as the 2nd > parameter > we have forced it to its senses. > Anyway, it works! > Have a great New Year. > > BW > > "Neil" wrote: > >> Well, I tried it and it resolved the problem here, too. So, thanks!! >> Amazing, though, about this: why wasn't this known/used before?... >> >> >> "BeWyched" <BeWyched[ at ]discussions.microsoft.com> wrote in message >> news:D255FC84-6E75-47BA-9498-70555895CB68[ at ]microsoft.com... >> > I've just tried something and its worked (at long last)!! >> > >> > Try adding the Server name into the CreateObject function with late >> > binding. >> > Try: >> > >> > Dim objOutlook >> > Set objOutlook = CreateObject("Outlook.Application", "LocalHost") >> > >> > Good luck! >> > >> > BW >> > >> > >> > "Gina Whipp" wrote: >> > >> >> Rick, >> >> >> >> I did the late binding first, still did not work but doing a repair of >> >> Office, now I didn't try that! I guess I'll be going to the Client's >> >> site. >> >> >> >> -- >> >> Gina Whipp >> >> >> >> "I feel I have been denied critical, need to know, information!" - >> >> Tremors >> >> II >> >> >> >> >> >> "Rick Brandt" <rickbrandt2[ at ]hotmail.com> wrote in message >> >> news:PLumh.1695$ji1.1049[ at ]newssvr12.news.prodigy.net... >> >> > "Gina Whipp" <NotInterested[ at ]InViruses.com> wrote in message >> >> > news:%23a$4OznLHHA.3552[ at ]TK2MSFTNGP03.phx.gbl... >> >> >> You are not alone, I too have this problem and I have spent hours >> >> >> on >> >> >> the >> >> >> clients site trying to figure it out to no avail. I am keeping my >> >> >> eyes >> >> >> pinned to this posting hoping someone can give some insight. >> >> > >> >> > My advice is that for an application that is to be deployed on >> >> > multiple >> >> > machines ZERO references should be added beyond the default ones. >> >> > All >> >> > other external library calls should be done with late binding which >> >> > does >> >> > not require a reference be added to the project. >> >> > >> >> > Using late binding you eliminate code failures that are specifically >> >> > caused by a missing reference and you can just focus on what doesn't >> >> > work. >> >> > The only time I have seen a late binding call to Outlook to not work >> >> > I >> >> > fixed it by doing a repair of Office on that PC. >> >> > >> >> > -- >> >> > Rick Brandt, Microsoft Access MVP >> >> > Email (as appropriate) to... >> >> > RBrandt at Hunter dot com >> >> > >> >> >> >> >> >> >> >> >>
|
|
Thanks for that.
I did try reinstalling Office on one PC without success. I did find a reference to problems with Automation in the MS Knowledge Base. There a a couple of articles - one is: http://support.microsoft.com/kb/828550/en-us It doesn't mention the Outlook problem specifically but talks more generally about automation problems. To resolve, it suggests (amongst others) an Office reinstall as a possible solution, but also mentions the 4 automation files in the Windows folder that must have the same build number and creation date. On my PC one of the files was different. I downloaded and ran the patch but it doesn't install the correct versions as it is supposed to - I think that this may be the basis of the problem. It does mention (I think in a connected article) that the files are associated with MS VB 6 which I do have on my PC - it would be interesting to know if you also have VB installed as a seperate application as this could be at the root of the problem.
As you say, its ok to leave the 'localhost' reference as the alternative to reinstall Office is clearly impractical on remote PC's - not very encouraging for external users to have to reinstall Office to makes ones softward work!
Regards.
BW
"Neil" wrote:
[Quoted Text] > Just FYI, the person whose machine had the problem uninstalled and > reinstalled office, and now his machine works with the original code > (without the "LocalHost" parameter). So that's interesting. I left the > parameter in, anyway, since it doesn't hurt anything. > > Neil > > "BeWyched" <BeWyched[ at ]discussions.microsoft.com> wrote in message > news:130AC8CB-9716-4A83-BFD3-DE9181F3C50A[ at ]microsoft.com... > > I'm delighted!! > > > > The problem clearly is that VBA isn't recognising the local server when > > the > > 2nd parameter of CreateObject is left out. It should! > > > > As you say, why hasn't this been identified before. Perhaps, there has > > been > > a recent Windows fix which has changed how the local server info. is > > stored? > > I'm also concious that my PC (on which I have the problem) runs several > > other > > server applications (IIS, SQL, Project etc.), is networked locally to > > other > > servers and has a remote access link to yet another server. I wonder if, > > somewhere deep in the bowels of Windows, VBA has confused itself over > > what/where the default server is. By adding 'localhost' as the 2nd > > parameter > > we have forced it to its senses. > > Anyway, it works! > > Have a great New Year. > > > > BW > > > > "Neil" wrote: > > > >> Well, I tried it and it resolved the problem here, too. So, thanks!! > >> Amazing, though, about this: why wasn't this known/used before?... > >> > >> > >> "BeWyched" <BeWyched[ at ]discussions.microsoft.com> wrote in message > >> news:D255FC84-6E75-47BA-9498-70555895CB68[ at ]microsoft.com... > >> > I've just tried something and its worked (at long last)!! > >> > > >> > Try adding the Server name into the CreateObject function with late > >> > binding. > >> > Try: > >> > > >> > Dim objOutlook > >> > Set objOutlook = CreateObject("Outlook.Application", "LocalHost") > >> > > >> > Good luck! > >> > > >> > BW > >> > > >> > > >> > "Gina Whipp" wrote: > >> > > >> >> Rick, > >> >> > >> >> I did the late binding first, still did not work but doing a repair of > >> >> Office, now I didn't try that! I guess I'll be going to the Client's > >> >> site. > >> >> > >> >> -- > >> >> Gina Whipp > >> >> > >> >> "I feel I have been denied critical, need to know, information!" - > >> >> Tremors > >> >> II > >> >> > >> >> > >> >> "Rick Brandt" <rickbrandt2[ at ]hotmail.com> wrote in message > >> >> news:PLumh.1695$ji1.1049[ at ]newssvr12.news.prodigy.net... > >> >> > "Gina Whipp" <NotInterested[ at ]InViruses.com> wrote in message > >> >> > news:%23a$4OznLHHA.3552[ at ]TK2MSFTNGP03.phx.gbl... > >> >> >> You are not alone, I too have this problem and I have spent hours > >> >> >> on > >> >> >> the > >> >> >> clients site trying to figure it out to no avail. I am keeping my > >> >> >> eyes > >> >> >> pinned to this posting hoping someone can give some insight. > >> >> > > >> >> > My advice is that for an application that is to be deployed on > >> >> > multiple > >> >> > machines ZERO references should be added beyond the default ones. > >> >> > All > >> >> > other external library calls should be done with late binding which > >> >> > does > >> >> > not require a reference be added to the project. > >> >> > > >> >> > Using late binding you eliminate code failures that are specifically > >> >> > caused by a missing reference and you can just focus on what doesn't > >> >> > work. > >> >> > The only time I have seen a late binding call to Outlook to not work > >> >> > I > >> >> > fixed it by doing a repair of Office on that PC. > >> >> > > >> >> > -- > >> >> > Rick Brandt, Microsoft Access MVP > >> >> > Email (as appropriate) to... > >> >> > RBrandt at Hunter dot com > >> >> > > >> >> > >> >> > >> >> > >> > >> > >> > > >
|
|
I do have VB 6 installed on my machine -- but my machine didn't have the problem. The person's whose machine had the problem didn't have VB 6 installed.
Neil
"BeWyched" <BeWyched[ at ]discussions.microsoft.com> wrote in message news:633F7AEF-B745-431C-A1F5-1DD5507326F4[ at ]microsoft.com...
[Quoted Text] > Thanks for that. > > I did try reinstalling Office on one PC without success. I did find a > reference to problems with Automation in the MS Knowledge Base. There a a > couple of articles - one is: > http://support.microsoft.com/kb/828550/en-us> It doesn't mention the Outlook problem specifically but talks more > generally > about automation problems. To resolve, it suggests (amongst others) an > Office > reinstall as a possible solution, but also mentions the 4 automation > files > in the Windows folder that must have the same build number and creation > date. > On my PC one of the files was different. I downloaded and ran the patch > but > it doesn't install the correct versions as it is supposed to - I think > that > this may be the basis of the problem. > It does mention (I think in a connected article) that the files are > associated with MS VB 6 which I do have on my PC - it would be interesting > to > know if you also have VB installed as a seperate application as this could > be > at the root of the problem. > > As you say, its ok to leave the 'localhost' reference as the alternative > to > reinstall Office is clearly impractical on remote PC's - not very > encouraging > for external users to have to reinstall Office to makes ones softward > work! > > Regards. > > BW > > "Neil" wrote: > >> Just FYI, the person whose machine had the problem uninstalled and >> reinstalled office, and now his machine works with the original code >> (without the "LocalHost" parameter). So that's interesting. I left the >> parameter in, anyway, since it doesn't hurt anything. >> >> Neil >> >> "BeWyched" <BeWyched[ at ]discussions.microsoft.com> wrote in message >> news:130AC8CB-9716-4A83-BFD3-DE9181F3C50A[ at ]microsoft.com... >> > I'm delighted!! >> > >> > The problem clearly is that VBA isn't recognising the local server when >> > the >> > 2nd parameter of CreateObject is left out. It should! >> > >> > As you say, why hasn't this been identified before. Perhaps, there has >> > been >> > a recent Windows fix which has changed how the local server info. is >> > stored? >> > I'm also concious that my PC (on which I have the problem) runs several >> > other >> > server applications (IIS, SQL, Project etc.), is networked locally to >> > other >> > servers and has a remote access link to yet another server. I wonder >> > if, >> > somewhere deep in the bowels of Windows, VBA has confused itself over >> > what/where the default server is. By adding 'localhost' as the 2nd >> > parameter >> > we have forced it to its senses. >> > Anyway, it works! >> > Have a great New Year. >> > >> > BW >> > >> > "Neil" wrote: >> > >> >> Well, I tried it and it resolved the problem here, too. So, thanks!! >> >> Amazing, though, about this: why wasn't this known/used before?... >> >> >> >> >> >> "BeWyched" <BeWyched[ at ]discussions.microsoft.com> wrote in message >> >> news:D255FC84-6E75-47BA-9498-70555895CB68[ at ]microsoft.com... >> >> > I've just tried something and its worked (at long last)!! >> >> > >> >> > Try adding the Server name into the CreateObject function with late >> >> > binding. >> >> > Try: >> >> > >> >> > Dim objOutlook >> >> > Set objOutlook = CreateObject("Outlook.Application", "LocalHost") >> >> > >> >> > Good luck! >> >> > >> >> > BW >> >> > >> >> > >> >> > "Gina Whipp" wrote: >> >> > >> >> >> Rick, >> >> >> >> >> >> I did the late binding first, still did not work but doing a repair >> >> >> of >> >> >> Office, now I didn't try that! I guess I'll be going to the >> >> >> Client's >> >> >> site. >> >> >> >> >> >> -- >> >> >> Gina Whipp >> >> >> >> >> >> "I feel I have been denied critical, need to know, information!" - >> >> >> Tremors >> >> >> II >> >> >> >> >> >> >> >> >> "Rick Brandt" <rickbrandt2[ at ]hotmail.com> wrote in message >> >> >> news:PLumh.1695$ji1.1049[ at ]newssvr12.news.prodigy.net... >> >> >> > "Gina Whipp" <NotInterested[ at ]InViruses.com> wrote in message >> >> >> > news:%23a$4OznLHHA.3552[ at ]TK2MSFTNGP03.phx.gbl... >> >> >> >> You are not alone, I too have this problem and I have spent >> >> >> >> hours >> >> >> >> on >> >> >> >> the >> >> >> >> clients site trying to figure it out to no avail. I am keeping >> >> >> >> my >> >> >> >> eyes >> >> >> >> pinned to this posting hoping someone can give some insight. >> >> >> > >> >> >> > My advice is that for an application that is to be deployed on >> >> >> > multiple >> >> >> > machines ZERO references should be added beyond the default ones. >> >> >> > All >> >> >> > other external library calls should be done with late binding >> >> >> > which >> >> >> > does >> >> >> > not require a reference be added to the project. >> >> >> > >> >> >> > Using late binding you eliminate code failures that are >> >> >> > specifically >> >> >> > caused by a missing reference and you can just focus on what >> >> >> > doesn't >> >> >> > work. >> >> >> > The only time I have seen a late binding call to Outlook to not >> >> >> > work >> >> >> > I >> >> >> > fixed it by doing a repair of Office on that PC. >> >> >> > >> >> >> > -- >> >> >> > Rick Brandt, Microsoft Access MVP >> >> >> > Email (as appropriate) to... >> >> >> > RBrandt at Hunter dot com >> >> >> > >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >>
|
|
[Quoted Text] > I have some code I use to create a mail message in Outlook 2003 from Access > as follows: > > Dim objOutlook As Outlook.Application > Set objOutlook = New Outlook.Application > etc.... > > The code works fine everywhere except on one computer. On that computer, the > user gets Error -2147024770: "Automation error. The specified module could > not be found." at the Set objOutlook line. > > I did some searching online, and I found that most of the time when people > got that message, it was because a DLL wasn't registered. So I looked up the > reference (in Access 2003) to "Microsoft Outlook 11.0 Object Library," and > it referred to msoutl.olb. However, that OLB file can't be registered, > because it's not an OCX or DLL. > > So, any thoughts about what needs to be done here? > > Thanks! > > Neil >
Hi, I had this problem too, I just got a friend of mine to search his computer for the file 'MSOUTL.OLB' and then send it me. I just copied it to the Office Directory (C:\Program Files\Microsoft Office\OFFICE10\MSOUTL.OLB) and then re-opened the database and everything worked fine then.
Nathan.
BizTalk Utilities - Frustration free BizTalk Adapters http://www.topxml.com/biztalkutilities
|
|
|