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

Form Customization without VBA
selstart returns position 0 if text is entered in memo field (not clicked)
Microsoft Access 2010 (mdb) automation with user based security
Dropdown list - default value
Share Windows folder outside my local network
VBA Access - Multiple Tables count by date
MS Access Pop-up on table modification
Combining multiple queries in one in Access
Fill table with all month days
Form based on a one-to-many relationship - just show parent records with child actions
Select Max Date by Date Range
MS Access Implementing FULL OUTER JOIN via UNION operator with AGGREGATION
access DLookUp multiple criteria
Combining 3 strings in Access VBA
DoCmd.TransferSpreadsheet triggering Error 3275 “unexpected error from external database driver”
Hyperlink Field with # in File Name

Categories

HOME
date
drivers
hp-exstream
cplex
react-redux
amazon-ecs
serverspec
contact
medical
floating-action-button
quicklook
correlation
windows-azure-storage
percona
normalizr
emulator
clickonce
physics-engine
web-sql
restful-authentication
jndi
smb
phpfox
tooltipster
greendao
libssl
bpel
tinymce-4
bcd
uisplitview
scorm2004
windows-dev-center
gammu
mapbox-gl
devextreme
x11-forwarding
neuroscience
elasticsearch-plugin
google-closure
fault
network-flow
python-c-api
alphabet
recursive-datastructures
magma
arrow-keys
dynamics-sl
or-tools
wdf
fody
gstreamer-0.10
connect-by
holder.js
persist
apachebench
tform
independentsoft
pyke
vhd
t4mvc
tarjans-algorithm
ios9.1
unity3d-gui
javafx-webengine
titanium-modules
code-access-security
mesa
p4java
hippomocks
picturefill
django-nonrel
mqx
ember-app-kit
online-compilation
regsvr32
enter
doh
javax.script
ecl
krl
propagation
oncheckedchanged
jmock
remember-me
subviews
digest-authentication
sortable-tables
sproutcore-2
mtj
simpletest
misv

Resources

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
javascript
java
csharp
php
python
android
jquery
ruby
ios
html