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

MS Access 2003 - Sparkline Graphs in Microsoft Access
How to extract the schema of an Access (.mdb) database?
Using loop in a Access Query
Access 2007 Empty Query Quirk
MS Access: How can I automatically reduce Text columns to an appropriate size for the data stored in them?
No max(x,y) function in Access
Why does a report throw an error when the corresponding query doesn't?
Programmatically Search an Access Listbox control's Items Based Off of a Textbox Entry
Auto populate a combobox
How can I add a button to an Access report to export it to Excel / PDF?
Access Caching ODBC connection settings
How to build the search form in ms-access
MS Access 2007 3044 Error
Assigning a Keyboard shortcut to a button in an Access 2007 form
ShellExecute() returns error code 5 when trying to open mdb file >10MB
Disable Check Box Based on Other Values

Categories

HOME
ms-access
listview
heroku
plone
youtube-api-v3
android-youtube-api
dacpac
volttron
kentor-authservices
row
leiningen
quartz-scheduler
foselasticabundle
windows-7-x64
finite-automata
jsdoc
http-status-code-504
ab-testing
contextmenu
amazonsellercentral
visjs
autoconf
graphicsmagick
one-to-many
numerical-methods
nouislider
ecto
avcapturesession
azure-sql-database
wallpaper
normal-distribution
mpmediaquery
picasso
jmonkeyengine
wixsharp
abstract-class
hilbert-curve
elasticsearch-plugin
cookiecutter-django
gulp-sourcemaps
quadratic-programming
google-closure
midl
acoustics
s
executenonquery
apple-news
long-polling
flickr-api
hibernate-tools
jedis
pubmed
prolog-setof
pnotify
mplayer
drupal-6
nativeapplication
home-directory
url-masking
xml-attribute
multiple-regression
markojs
fadeout
livequery
qtableview
ora-00900
spidermonkey
purge
embedded-code
deis
sailfish-os
rake-task
applescript-objc
project-planning
android-radiobutton
ember-charts
multiprocessor
dir
jmapviewer
google-cloud-save
html4
chronoforms
cisco-jtapi
bigcouch
nsdatecomponents
psi
xmemcached
visitor-statistic
w3wp.exe
sortable-tables
revisions
preference
compiler-specific
zend-tool
dbisam

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
Mobile App
Mobile App
Mobile App