Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MsAccess <-> MsOutlook: CreateObject - error

Status
Not open for further replies.

smitan

Programmer
May 11, 2002
115
DK
Hi,

In a MsAccess application we create a mailmessage and send it out using MsOutlook object model.
Part of the code:
Code:
On Error GoTo GetOutLook_Error
    GetOutLook = False
    Set objOutLook = CreateObject("Outlook.Application")    
    If Err Then
        MsgBox "Error"
        Exit Function
    End If
    
    Set objNameSpace = objOutLook.GetNamespace("MAPI")
    If Err Then
        MsgBox "Error"
        Exit Function
    End If

GetOutLook_Exit:
    GetOutLook = True
    Exit Function
We run MsAccess application on various machines, using Windows 2K and XP.
We run Office 2000 with a Outlook 2003 (installed on top of the Outlook 2000 in Office 2000) with SP1
On these machines we have no problems with the application.

NOW we bought two new machines with XP and BasisOffice 2003 (Word + Excel + Outlook) installed.
On these two machines we have always problems in:
Set objOutLook = CreateObject("Outlook.Application").
It returns a 'Automation Error'.

I tried:
1. Early binding
2. Late binding
3. Installed the separate Outlook 2003, which we also run on the other XP machines (those we also run Off2K) on top of the BasicOffice.

No matter what situation. Always a problem in this CreateObject.

Any sugestion on this problem? The users on these two machines are getting irritated. I am getting desperate.

Thanks,
Smitan
 
Hi,

I have exactly the same error (and no solution yet).

My set up is WinXP and Office 2003. My code runs fine on another XP machine with the same office install and also on WINNT and Win2000 machines running office2000.

Because it happens on my laptop which I use infrequently, I let it rest for a while. However, it seems to me that my office install is not correct. The automation error points to a missing module, or probably it is not properly registered. I tried to find what dll I should register with regsrv32, but couldn't find out. De-installing and reinstalling could solve this, but I didn't try that yet.

So any good optins would be welcome for me too!

EasyIT
 
Hmmmm, not so good.
How do you find out about this module, maybe it might point me into a direction.
Smitan.
 
...At first I thought it was msoutl.olb (see references and location of this file), but I cannot register it with regsrv32 (and I'm not sure it is the culprit). So I did some googleing - no luck. At that point I postponed it!

Is it possible for you to try a reinstall of office? or maybe you have more luck with finding which file should be registered?
 
I did try a reinstall of my BasicOffice. First after I had done this, I decided to install a separate version of Outlook 2003 on top.

I am thinking of removing Off2003, install Off2000 and install Outlook2003 and therefter install Off2003 again. A stupid way of installing, but I have to give it a try.
 
hmmm, installing msoff2000 could be the trick. My laptop was new, no msoff2000 installed prior. Other machines did have msoff2000 installed.

Could you let me know if you have any results?

 
Do so on monday. I'll inform Tek-Tips.
Have a nice weekend.
Smitan
 
OK, now I am ready RE-installing the old situation:

Off2K + Outlook2003 + MyApplication + Off2003SP1

It's a shame of course, but now everything works as it should. Keep on looking for a solution to install Off2003 (which we paid for and should be running on) again with positiv result.

My users are happy and that's what counts!

I did try to install the above mentioned PLUS Off2003, with no succes. So, I deleted the whole lot again and started at the beginning.

Whenever you (easyit or other) come to a good solution, please tell me, I'll try to do the same.

Have a nice day.
 
Well,

I deinstalled Office2003, installed office2000 and then reinstalled Office2003 again. Guess what? Problem solved.

The reasons for this are probably related to registering of outlook modules, but which, why and how..I don't know.

EasyIT


 
Thanks, one of these days, I'll reinstall Off2003 again. Maybe my problem is also solved.
If not, I have to start all over again.
Thanks for the contact.
Smitan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top