OutputTo Macro not running (1 Viewer)

GBalcom

Much to learn!
Local time
Today, 13:15
Joined
Jun 7, 2012
Messages
459
Hello,
Made a quick app this morning which uses a macro to email a report. Runs fine on my computer (Win10/access 2013). When I deploy to Station A or B (Win7/Access 2013 runtime) it gives me the following error.

The command or action 'OutputTo' isn't available now
-You may be in a read-only database or an unconverted database from an earlier version of (the project)

-The type of object the action applies isn't currently selected or isn't in the active view.

Use only commands and macro actions that are currently available for this database.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:15
Joined
May 7, 2009
Messages
19,169
not all commands are available on runtime version of access.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:15
Joined
Oct 29, 2018
Messages
21,358
Hi. What is the filepath you're outputting the report to? Does the user have write access/permission to it? Just curious...
 

GBalcom

Much to learn!
Local time
Today, 13:15
Joined
Jun 7, 2012
Messages
459
It's actually the emaildatabaseobject macro I'm using. Is that one available? I can write it in VBA, it just seemed easier for this one to do it in a macro....guess not.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:15
Joined
Oct 29, 2018
Messages
21,358
It's actually the emaildatabaseobject macro I'm using. Is that one available? I can write it in VBA, it just seemed easier for this one to do it in a macro....guess not.
I'm not 100% certain but either EmailDatabaseObject or OutputTo should be available in runtime. Just in case, see if there's another potential cause for the issue.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:15
Joined
May 7, 2009
Messages
19,169
you may simulate a Runtime version on your own pc.
create a new shortcut to your desktop.
locate msaccess.exe.
modify it by adding your db in enclosed double quote and /runtime, eg:
Code:
"C:\Program Files\Microsoft Office\root\Office16\MSACCESS.EXE" "d:\mydb.accdb" /runtime
see if error occurs on your macro. if it does then it is not available.
 

GBalcom

Much to learn!
Local time
Today, 13:15
Joined
Jun 7, 2012
Messages
459
Thanks arnelgp, I forgot about that. Another trick you helped me remember is if you just change the file extension from .accdb to .accdr it will also simulate the runtime.

Using this trick did confirm, it no longer has the functionality of 'outputTo', which is being used in Email object, and in VBA, docmd.SendObject

I tried it both ways. I do have some code I'll need to dig up to handle this.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:15
Joined
May 7, 2009
Messages
19,169
careful where you dig, you might hit the gas line:eek:
 

GBalcom

Much to learn!
Local time
Today, 13:15
Joined
Jun 7, 2012
Messages
459
Hmm...The code I have was to send an email automatically. I'd like to have it open for the user to edit before sending. The real trick is I don't use Outlook, but rather EMClient.

It must be possible because docmd.sendobject will prepopulate the message and prepare it to be edited on my machine. But that doesn't work on others with the runtime version
 

Users who are viewing this thread

Top Bottom