Failure of SendObject in Access 2003 Runtime

G

Guest

I have an automatic e-mail generator with the following line of code in it.

DoCmd.SendObject acSendReport, "BlankReport", acFormatHTML, _ FirmEAddress,
, EAddress, "Client Invitation"

This code was written in Access 2002 and is in an mde file. The procedure
works flawlessly in Office XP. When running it in Access 2003 is behaves as
expected. However; when deploying the application to other machines with a
runtime version of Access 2003 the following error message appears:

"2281 The formats that enable you to output data as a Microsoft Excel,
rich-text format, MS-DOS text, or HTML file are missing or incorreclty
registered in the Windows Registry."

Extensive research and reading has failed to produce any solution.

Can someone help me out here?

TIA
 
R

Rick Brandt

Rick said:
I have an automatic e-mail generator with the following line of code
in it.

DoCmd.SendObject acSendReport, "BlankReport", acFormatHTML, _
FirmEAddress, , EAddress, "Client Invitation"

This code was written in Access 2002 and is in an mde file. The
procedure works flawlessly in Office XP. When running it in Access
2003 is behaves as expected. However; when deploying the application
to other machines with a runtime version of Access 2003 the following
error message appears:

"2281 The formats that enable you to output data as a Microsoft Excel,
rich-text format, MS-DOS text, or HTML file are missing or incorreclty
registered in the Windows Registry."

Extensive research and reading has failed to produce any solution.

Can someone help me out here?

TIA

The runtime setup did not set all of the registry entries required for the
various output formats. I don't have the exact keys handy, but if you look in
the registry of a PC that works these registry entries are not that difficult to
find. If I recall correctly there are actually two different sets that are
needed. One controls what can actually be output and one controls the options
one sees when doing the export or SendMail from the GUI. The runtime might not
need the second set if you are not allowing the user to choose the output
format.
 
G

Guest

Hi Rick:

Thanks for the input. I have used regedit to examine the registry keys in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\10.0 (and
11.0)\Access\Clipboard Formats for HTML and they both read (*htm,*thml)
REG_5Z soa.dll,30,HTMLFormat,HTML(*html),1

This is after I have installed the 2003 Access Runtime on the machine.

Still puzzled on what needs to be changed and how to make the change on
Micrsoft Installer Wizard. The instructions are very vague on additing
registry keys with the package wizard and ask for Root, Key, Name and Data
but does not suggest anything for the proper syntax for these fields.

Would truly appreciate any further input that might help me.
 
R

Rick Brandt

Rick said:
Hi Rick:

Thanks for the input. I have used regedit to examine the registry
keys in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\10.0 (and
11.0)\Access\Clipboard Formats for HTML and they both read
(*htm,*thml) REG_5Z soa.dll,30,HTMLFormat,HTML(*html),1

This is after I have installed the 2003 Access Runtime on the machine.

Still puzzled on what needs to be changed and how to make the change
on Micrsoft Installer Wizard. The instructions are very vague on
additing registry keys with the package wizard and ask for Root,
Key, Name and Data but does not suggest anything for the proper
syntax for these fields.

Would truly appreciate any further input that might help me.

These are the the 2003 equivalents of the Access 97 keys that I include in My
Access 97 runtime setup.

Key Name:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Access\Jet\4.0\ISAM
Formats\Snapshot Format
Class Name: <NO CLASS>
Value 0
Name: ReportFormat
Type: REG_SZ
Data: Snapshot Format

Value 1
Name: Autostart
Type: REG_SZ
Data: Yes

Value 2
Name: OutputToOnly
Type: REG_SZ
Data: Yes

Value 3
Name: ExportFilter
Type: REG_SZ
Data: Snapshot Format (*.snp)


Key Name:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Access\Report Formats
Class Name: <NO CLASS>
Value 0
Name: Rich Text Format
Type: REG_SZ
Data: rtf,SOA_RptToRTF,Rich Text Format,Rich Text Format (*.rtf),0

Value 1
Name: Data Access Page
Type: REG_SZ
Data: html,,DAP Format,MicrosoftAccessDataAccessPage
(*.htm;*.html),36

Value 2
Name: Microsoft Excel 97-2003
Type: REG_SZ
Data: xls,SOA_RptToBIFF, Biff8,Microsoft Excel Biff8 (*.xls),0

Value 3
Name: Text Files
Type: REG_SZ
Data: txt,SOA_RptToAscii,1,MS-DOS Text (*.txt),0

Value 4
Name: Microsoft Excel 5-7
Type: REG_SZ
Data: xls,SOA_RptToBIFF, Biff5,Microsoft Excel Biff5 (*.xls),0

Value 5
Name: HTML
Type: REG_SZ
Data: html,SOA_RptToHtml,1,HTML (*.html),1

Value 6
Name: XML
Type: REG_SZ
Data: xml,,XML Format,XML (*.xml),364

Value 7
Name: Snapshot Format
Type: REG_SZ
Data: snp,,1,Snapshot Format (*.snp),0
 
G

Guest

Hello Rick:

Well, still at a standstill. I went out a purchased Microsoft Windows
Registry Guide by Jerry Honerycutt and after several hours of reading and
with the info you provided I was finally able to get the Package Wizard
syntax correct. After running Wizard I used regedit to check all of the keys
in Office 11.0 were as you suggested.

Still getting the same error message when attempting to run the application
with Access 2003 runtime.

Do you know if there is a tool available to check to see which registry
entries are being polled when the application runs successfully on full
Access 2003 on the developement machine?
 
R

Rick Brandt

Rick said:
Hello Rick:

Well, still at a standstill. I went out a purchased Microsoft Windows
Registry Guide by Jerry Honerycutt and after several hours of reading
and with the info you provided I was finally able to get the Package
Wizard syntax correct. After running Wizard I used regedit to check
all of the keys in Office 11.0 were as you suggested.

Still getting the same error message when attempting to run the
application with Access 2003 runtime.

Do you know if there is a tool available to check to see which
registry entries are being polled when the application runs
successfully on full Access 2003 on the developement machine?

Sorry, I do not.
 
R

Rick Brandt

Rick said:
Sorry, I do not.

How about some additional experimenting? If you have just the following in an
app...

DoCmd.SendObject acSendReport, "BlankReport"

Then you should get a popup that allows the user to choose the format for the
attachment. See if that comes up for you and whether you see all of the options
you expect.

Also I would test to see if you have the same problems with the OutputTo
command.
 
G

Guest

DoCmd.SendObject acSendReport, "BlankReport"
and
DoCmd.OutputTo acOutputReport, "BlankReport", , "C:\RicksOutput"

behave the same; same error message without the option to choose a format
which does appear on the full Access 2003 machine.

"The expression On Click your entered as the event property setting produced
the following error: The formats that enable you to output data ..... are
missing or incoreectly registered in the Windows Registry.

Wonder if a security function might be distrupting output. When loading the
application on the runtime machine the Security Warning pops us stating "The
file may not be safe if it contains code that was intended to harm your
computer."
 
R

Rick Brandt

Rick said:
DoCmd.SendObject acSendReport, "BlankReport"
and
DoCmd.OutputTo acOutputReport, "BlankReport", , "C:\RicksOutput"

behave the same; same error message without the option to choose a
format which does appear on the full Access 2003 machine.

"The expression On Click your entered as the event property setting
produced the following error: The formats that enable you to output
data ..... are missing or incoreectly registered in the Windows
Registry.

Wonder if a security function might be distrupting output. When
loading the application on the runtime machine the Security Warning
pops us stating "The file may not be safe if it contains code that
was intended to harm your computer."

Possible. Is the user running the runtime app logged in with administrator
authorities on the PC? If not it might be interesting to try while logged in
with an admin account to see if anything is different.
 
G

Guest

I have administrator rights on both machines and am installing the 2003
Runtime on the target (test) machine so that should not be an issue. I saw
another posting a few days ago that suggested the following keys should be
added to 2003 runtime to disable security:


HKEY-LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines
"SandBoxMode" = dword: 00000002

HKEY-LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Access\Security
"Level"= dword: 00000001

Any comments?
 
R

Rick Brandt

Rick said:
I have administrator rights on both machines and am installing the
2003 Runtime on the target (test) machine so that should not be an
issue. I saw another posting a few days ago that suggested the
following keys should be added to 2003 runtime to disable security:


HKEY-LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines
"SandBoxMode" = dword: 00000002

HKEY-LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Access\Security
"Level"= dword: 00000001

Any comments?

Worth a try. I have no idea.
 
G

Guest

Well, I have hit the wall. Tried lower the security levels on macros without
success.

I have finally caved and modified the routine to:

DoCmd.SendObject acSendNoObject, , , FirmEAddress, , EAddress, "Client
Invitation"

to avoid any reference to an attachment and avoid the format error message.

The rountine now runs uneventfully and generates an e-mail with several
BCC's and the users on the target machine will have to attach any documents
to the e-mail on that end.

It does not appear to related to MS Outlook or Exchange Server since the
e-mail is generated properly. Something has to be wrong with the formatting
registry keys somehwere. If you can think of anything else I might check
please let me know.

Perhpaps someone else will jump in an offer something. Thank you for your
gallant efforts and patience, Rick.
 
R

Rick Brandt

Rick said:
Well, I have hit the wall. Tried lower the security levels on macros
without success.

I have finally caved and modified the routine to:

DoCmd.SendObject acSendNoObject, , , FirmEAddress, , EAddress,
"Client Invitation"

to avoid any reference to an attachment and avoid the format error
message.

The rountine now runs uneventfully and generates an e-mail with
several BCC's and the users on the target machine will have to attach
any documents to the e-mail on that end.

It does not appear to related to MS Outlook or Exchange Server since
the e-mail is generated properly. Something has to be wrong with the
formatting registry keys somehwere. If you can think of anything
else I might check please let me know.

Perhpaps someone else will jump in an offer something. Thank you for
your gallant efforts and patience, Rick.

No problem. If I think of anything else I will post back to the thread.
One last thought though...have you tried this on more than this one PC?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top