ms-access


Run-time error '-2147221233(8004010f)': object not found - Access Database


I'm building a scheduling database for my office, and have it mostly finished. The last step is sending an automated meeting out for the schedule created each day. This email MUST come from a secondary email account/calendar shared by all members of my team. The code below runs just fine on my personal computer, but will not run on others even though they have access to the same email and calendar.
The error I get is this:
run-time error '-2147221233(8004010f)': The attempted operation failed. An object could not be found.
The line it's screwing up on is this: Set OLFolder = OLNamespace.Folders.Item("name#address.office.com")
Here's my code:
Private Sub sendacdcsched_Click()
'sends an email with a calendar appointment for the facility schedule.
DoCmd.Save 'saves the record first
Dim OutlookApp As Object
Dim Outlookmessage As Object
Dim scheduleACDC As String
Dim OLNamespace As Object
Dim OLFolder As Object
scheduleACDC = "Schedule for ACDC for " & Me.schedDate.Value
'Create Instance of Outlook
On Error Resume Next
Set OutlookApp = GetObject(Class:="Outlook.Application") 'Handles if Outlook is already open
Err.Clear
If OutlookApp Is Nothing Then Set OutlookApp = CreateObject(Class:="Outlook.Application") 'If not, open Outlook
On Error GoTo 0
Set OLNamespace = OutlookApp.getnamespace("MAPI")
Set OLFolder = OLNamespace.Folders.Item("name#address.office.com")
'Create a new email message
Set Outlookmessage = OLFolder.items.Add(1)
'Create Outlook email with attachment
On Error Resume Next
With Outlookmessage
.meetingstatus = 1 'makes it a meeting so you can add recipients
.start = Me.schedDate & " 8:00:00 AM"
.duration = 240 'in minutes
.To = "" 'Insert all emails addresses to be sent to here'
.subject = "ACDC" 'email subject line'
.Body = scheduleACDC
.Display 'displays email before you send it. If you wish to send without seeing it displayed use .send'
End With
On Error GoTo 0
End Sub


Related Links

getting the value of two fields with checkbox
Is it possible to bind form controls to VBA properties?
SQL Query to retrieve Item name and sum of amounts for that item
Query missing data from select fields for only 2 records
Microsoft Access - Search Query
Like with IIF and date range not returning results
OPening multiple copies of ACCESS app
Access New ID Field YYYYMMNN [duplicate]
Sequential Number Column with YYYYMM
I am trying to get the correct font size for my subform in Access
Start and stop MS Access VBA code on a specific time
Table Joining (ms Access, sql)
Howto write DDL ALTER TABLE Modify statement using string variable for TABLE name
Filter combobox: how to add “NOT filtered” option?
access 2010 form new record pre filled button
Azure SQL authentication with Office 365 Account

Categories

HOME
testing
yii2
client
tinymce
rsyslog
gis
cvs
umd
ezpublish
iggrid
kibana-4
adobe-analytics
row
rascal
google-cloud-spanner
foselasticabundle
text-rendering
google-pagespeed
predix
abi
ehcache
mmap
firebase-crash-reporting
numerical-methods
dynamic-featured-image
bootstrap-material-design
jaxb2
react-chartjs
jspresso
lxd
subset-sum
accelerate-framework
language-concepts
ghost4j
wallpaper
mpmediaquery
catalog
http-digest
io-redirection
restlet
x11-forwarding
dynamics-crm-2013
sharefile
optix
android-tabhost
galen
nomethoderror
android-mediaprojection
no-www
turbogears
hibernate-tools
filepicker
svmlight
darcs
pdfclown
epson
zendesk-app
spring-mongodb
redundancy
chord-diagram
color-picker
login-control
ipconfig
intellij-14
simple-framework
computer-algebra-systems
angular-leaflet-directive
notify
inmobi
network-interface
asp.net-dynamic-data
java.util.concurrent
phalanger
xcode-6.2
onactivityresult
doskey
html4
xamlparseexception
sharp-repository
enterprisedb
factory-method
e4x
sublist
rdoc
coderush
armcc
twrequest
onsubmit
parametric-equations
wse3.0
uiviewanimation-curve
buildr
postgresql-performance
ohm
boost-filesystem
window-management
django-tagging
mysql-error-1005
yslow
modelstate
forums
dbal
thunderbird-lightning





Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm