473,396 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Missing Reference MSOUTL.OLB

489 256MB
This has just started on some of my customers computers. I call outlook from within my app to send out emails. My program is on customers computers is compiled .accdr, I getting calls from some of my customers that they are getting an error "function not available". When I do the check references I find that the Outlook object library OLB is missing and that is causing the problem. What I've found is that if the customer doesn't have outlook on his/her machine that this is happening. I don't know why this hasn't happened before but now it has started. If I remove the MSOUTL.OLB reference everything works fine, but of course for those that have Outlook then Outlook doesn't work.
I don't want to have two programs one for Outlook and another for those without Outlook.
Does any body have any answers???
Thanks
Mar 11 '19 #1
12 4512
twinnyfo
3,653 Expert Mod 2GB
Hey Tom!

My first question would be why all users in an enterprise environment don't have the same software--but that's probably way out of your hands.

My second question would then be, if they don't use Outlook, what do they use for e-mails? If you have a plethora of e-mail options, then you r job becomes increasingly more difficult, if not impossible.

If there is only one other e-mail option, then you need to figure out how to integrate that application into Access--in a manner similar to how you integrate Outlook. You would then just need to figure out who uses which e-mail system, which can become a nightmare.

The "best" solution is to have ll users on one e-mail system.

Hope this hepps!
Mar 11 '19 #2
CD Tom
489 256MB
OK, some of my customers don't use the program to send emails. The program has options to send out reports created in PDF right from within the program.
Some customers use another email and create and save the pdf and then using their email provider (yahoo, gmail, etc) send the reports out that way.
I wish I knew how to setup VBA to use other email providers, and be able to check each user to find out which email provider they used and switch the program to use their provider.
Anyway thanks for the reply.
Mar 11 '19 #3
twinnyfo
3,653 Expert Mod 2GB
You may have to set up error trapping within your code. Theoretical example here:
  • Someone wants to send a pdf from the Db
  • The DB asks if they use Outlook
  • If they say no, it just downloads the PDF and tell sthem to send it manually
  • If they say yes, the DB tries to send it
  • If an error is produced, it notifies the user and downloads the PDF
  • If there is no error, it sends the pdf via outlook

This might be a bit more involved than what you were thinking, but it might be a bit less involved than trying to build around other e-mail applications.
Mar 11 '19 #4
Rabbit
12,516 Expert Mod 8TB
There are more universal methods of sending email. For example, using a CDO object.

Expand|Select|Wrap|Line Numbers
  1. Sub sendEMail(strMessage)
  2.     On Error Resume Next
  3.  
  4.     Dim oCDO
  5.     Set oCDO = CreateObject("CDO.Message")
  6.  
  7.     With oCDO
  8.         .Subject = inputbox("subject")
  9.         .From = inputbox("from")
  10.         .To = inputbox("to")
  11.  
  12.         .HTMLBody = strMessage
  13.         .Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
  14.         .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.emailserver.com"
  15.         .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
  16.         .Configuration.Fields.Update
  17.         .Send
  18.     End With
  19.  
  20.     If err.Number <> 0 Then err.Clear
  21. End Sub
You will just need to figure out the correct server address and port. For outlook, you can find that in your in account settings or you can ask your exchange server admin. For gmail and yahoo, you can find that online. For the latter, you will need to modify the script to pass in credentials.
Mar 11 '19 #5
twinnyfo
3,653 Expert Mod 2GB
Rabbit,

Very interesting. I never knew such a thing was available. Thanks for the tidbit!
Mar 11 '19 #6
CD Tom
489 256MB
That would probably work except. In the references the MSOUTL.OLB is checked if the user uses Outlook, however if they don't have outlook then they get a reference error and the "function not available" shows up. Is there a way to remove the MSOUTL.OLB reference from the references if the user doesn't have outlook installed on their computer.
Mar 11 '19 #7
CD Tom
489 256MB
I like the idea Rabbit, in your example how would you attach a document to this from and could you send to multiple users. I suppose you could just create a loop.
Might give this a test.
What is the 2 for in the sendusing?
Mar 11 '19 #8
twinnyfo
3,653 Expert Mod 2GB
Tom,

Concerning your Post #7, that's what I was talking about error trapping. If someone tries to send something and they get this error, you need to find out the error number and if the DB encounters that error, go to Plan B.
Mar 11 '19 #9
CD Tom
489 256MB
I can trap that error number but going to Plan B means I still would have to eliminate the MSOUTL.OLB reference otherwise the "function not available" would not function. So is there a way in VBA to remove a reference, remember this is a .accdr and I only have the VBA code to try and remove the MSOUTL.OLB reference.
Mar 11 '19 #10
Rabbit
12,516 Expert Mod 8TB
The CDO object has an AddAttachment method. You just need to supply the path of the file you want to attach.

You can use a loop. You can also supply multiple email addresses for the To property. If you're sending a mass email, a BCC might be better so you don't get reply all spam.

What you see above is pretty much the bare minimum to send an email through an exchange server.
Mar 11 '19 #11
Rabbit
12,516 Expert Mod 8TB
Send using 2 tells it to use SMTP over the network.
Send using 1 tells it to use SMTP installed on the local computer.
Mar 11 '19 #12
twinnyfo
3,653 Expert Mod 2GB
Tom - now i'm beginning to see more of the complexities with this.

I know you can remove references in VBA (References.Remove), but I'm not sure if the user who didn't have Outlook would hit that error first. But, it might be worth a try to remove that reference whenever the DB encounters the said error number.
Mar 11 '19 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: NickA | last post by:
I'm getting the following error: '<name>' is declared in project '<projectname1>', which is not referenced by project '<projectname2>' It just started showing up the last time I did a build. ...
0
by: Richard Sherratt | last post by:
I have an Access 97 front end to an SQL Server 2000 database. One of the functions in the front-end generates an Excel spreadsheet using a template stored on a file server and plugs in some values...
3
by: AP | last post by:
I have an app that has one small component that uses a reference to MS Outlook 9.0 to create an email. Now we have users on 9.0 and 11.0, sometimes it causes the reference to switch and this causes...
1
by: richhemmings | last post by:
Hi, am having issues with a 'simple' bit of code:- Private Sub Command2_Click() Dim rs As Recordset Set rs = CurrentDb.OpenRecordset("tbl - availability") rs.Close
3
by: =?Utf-8?B?amV6MTIzNDU2?= | last post by:
Hi experts. I have a c# widows program that uses 3rd party dlls. All works correctly on my PC but when I try to run the exe on another PC, I get an error indicating a missing reference. I...
2
by: Sebastian Paul | last post by:
Hi, I have a user control (EventStructureSelector) used in another user control (ResultsMenu). The class EventStructureSelector defines a public type (ModeType), that is used for one of its...
3
by: NEWSGROUPS | last post by:
I am in the midst of trying to convert about 25 Access 2000 to Access 2003. The new environment consists of Office/Access 2003 and Outlook 2003. When converting the back ends I have no problems....
1
by: DThreadgill | last post by:
Have a database that about 6 or 7 people use simultaneously with no problem and have for the past year or so. Have a new person that now needs to do work in there and she is getting Missing...
3
honny singh
by: honny singh | last post by:
My application normally working in xp but when i run the same application in win7 then I am getting the missing reference error Please provide some solution about this topic Thanks
4
by: GKJR | last post by:
My database seems to be acting up on me today. It is throwing up errors and highlighting very basic built in functions like Format() and Left(). It's happening when I run my code that I've used for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.