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

How do I create copies of CurrentDb using VBA
How to include empty rows in Access query results
how to make data in access to only have 2 decimal number
Populating listbox from another listbox selection
MS- Access: Switch or Iif based on count of other query field
Convert rdb to an ontology
Pass-through Query Ignores incorrect passwords after a successful connection
MS Access MTD/QTD QUERY
Not getting the refresh_token for MS365 Task
Datediff in MsAccess
Listbox show column names of table
<= todays date in the same month i
Need to Automatically Edit Access TextBox in SubForm after SetFocus
Access Services: Filtering on orphaned records with a web query
How to check whether a combobox selection contains specific text or word
Hyperlink to other tables in MS Access

Categories

HOME
openlayers
ngrx
json.net
iterator
read-eval-print-loop
react-redux
survey
webpack-2
angular-ui-bootstrap
ojdbc
fancybox
rascal
windows-azure-storage
moonmail
django-simple-history
systemc
code-review
visjs
core-text
autosys
shopware
one-to-many
assistant
facebook-apps
google-cloud-nl
flink-streaming
r-raster
google-sites-2016
gtrendsr
vxworks
dosbox
swift3.0.2
webdriver-manager
graphenedb
avro4s
ncalc
jquery-nestable
theming
pnotify
git-diff
feeds
vtigercrm
query-performance
topbeat
wdf
spring-android
mathematica-frontend
gridview-sorting
jwplayer7
angstrom-linux
markojs
react-native-listview
lua-5.1
hill-climbing
bluegiga
iad
django-unittest
pundit
emailrelay
riak-cs
operation
cisco-ios
proj4js
bridge.net
device-orientation
system.reflection
knuth
phalanger
device-manager
ceil
typeof
comexception
marmalade
meteor-velocity
xamlparseexception
libstdc++
multipage
amazon-appstore
eclipse-templates
boost-filesystem
gwt-ext
external-accessory
gcj
heartbeat
tomcat-valve
f#-powerpack
krl
xfbml
dbal
rescale
user-friendly
audio-capture
sef
iweb
uimenucontroller
eqatec
w3wp
data-acquisition

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile