UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Error Using Outlook Object, Access 2007    
 
   
t.heisler
post May 21 2020, 06:35 PM
Post#1



Posts: 20
Joined: 28-January 19



Hello there,

I'm getting this error all of a sudden using this line of code this is working on other PC's and has been for years without any code changes.
PC's are running windows 10 pro 64 bit, access 2007, and outlook 2007.

Line of code with error:

Dim olApp As Object
Set olApp = CreateObject("Outlook.Application", "localhost") -- error on this line "Permission Denied" (error number 70)

Not currently using the outlook reference just the access 12.0 object library but like I said the references / code hasn't changed in years it's something specific to this particular laptop.
Has anyone seen this error occur with outlook?

So far I have tried reinstalling office 2007 and repairing it without any luck.

Any help would be much appreciated, thank you!

Go to the top of the page
 
theDBguy
post May 21 2020, 07:47 PM
Post#2


UA Moderator
Posts: 78,155
Joined: 19-June 07
From: SunnySandyEggo


Hi. What do you get with this modified version of your code?

Set olApp = CreateObject("Outlook.Application")

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
t.heisler
post May 21 2020, 09:01 PM
Post#3



Posts: 20
Joined: 28-January 19



I get the same error, "Permission Denied".
Go to the top of the page
 
projecttoday
post May 21 2020, 10:48 PM
Post#4


UtterAccess VIP
Posts: 12,247
Joined: 10-February 04
From: South Charleston, WV


Did it ever work on that PC?

--------------------
Robert Crouser
Go to the top of the page
 
t.heisler
post May 22 2020, 06:09 AM
Post#5



Posts: 20
Joined: 28-January 19



Nope its a brand new laptop, but its setup the same as all the others.
This post has been edited by t.heisler: May 22 2020, 06:17 AM
Go to the top of the page
 
t.heisler
post May 22 2020, 09:26 AM
Post#6



Posts: 20
Joined: 28-January 19



So I removed all the references I had and added them back now I get a different error on the same line: "ActiveX component can't create object".
This post has been edited by t.heisler: May 22 2020, 09:26 AM
Go to the top of the page
 
t.heisler
post May 22 2020, 09:45 AM
Post#7



Posts: 20
Joined: 28-January 19



I figured it out, I had to go into the folder properties of the office12 folder and set read only to false and give "Everyone" full control of the folder and its working.

Not sure why I had to reset the references to get the real error message but hey that's Access for ya.
Go to the top of the page
 
projecttoday
post May 22 2020, 09:49 AM
Post#8


UtterAccess VIP
Posts: 12,247
Joined: 10-February 04
From: South Charleston, WV


So this is about 1 pc? Is it the same model as the ones that work? Same version of Windows with the same updates?


--------------------
Robert Crouser
Go to the top of the page
 
projecttoday
post May 22 2020, 09:53 AM
Post#9


UtterAccess VIP
Posts: 12,247
Joined: 10-February 04
From: South Charleston, WV


Great! Glad you got it working. (I didn't see your last post.)

--------------------
Robert Crouser
Go to the top of the page
 
t.heisler
post May 22 2020, 10:04 AM
Post#10



Posts: 20
Joined: 28-January 19



I actually was getting another laptop ready and it had the same issue, it must have something to do with installing office 2007 on windows 10.

I guess the install doesn't work the same as on windows 7 as far as setting the folder permissions etc.
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    6th June 2020 - 02:56 AM