Generic Office document viewer (1 Viewer)

Status
Not open for further replies.

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 01:44
Joined
May 7, 2009
Messages
19,169
here is a sample Office Documents
Viewer. it can view (and edit), Word
documents, excel worksheet/workbook, powerpoint,
text files (untouched), and pdfs.

it uses WebBrowser control. in case
the office documents run "outside" the webcontrol
(not being hosted), as in the case of Newer office
(office 2013-16), just run the .reg file then
try again to view those files.

Created in a2016 x64.

enjoy.
 

Attachments

  • Viewer.zip
    21.8 KB · Views: 1,886

CedarTree

Registered User.
Local time
Today, 13:44
Joined
Mar 2, 2018
Messages
404
Hello. I tried the suggested file above and even did my own webcontrol attempt before that as well. I can open a PDF file within the webcontrol. But when choosing a Word or Excel file, Access prompts to Open the document (or save) in the Native application (Word or Excel). In VBA, all I'm doing is updating the control source as follows:

Code:
Forms!usysfrmMain.ctlWebBrowser.ControlSource = "=(" + Chr(39) + pURL + Chr(39) + ")"

For PDFs, works fine, but not for Office items. Suggestions please?
 

Leo_Polla_Psemata

Registered User.
Local time
Today, 10:44
Joined
Mar 24, 2014
Messages
364
Hi
I have downloaded this file and it does exactly what i need to do in my database.

When I transfer the code to my database, I click the "browse for file" and I get the below error on code

Dim fd As Office.FileDialog

Compile error
User-defined type not defined

My knowledge in vba is rudimentary.
I must have missed something very basic, please help
 

Gasman

Enthusiastic Amateur
Local time
Today, 17:44
Joined
Sep 21, 2011
Messages
14,045
arnelgp,

I've just downloaded this from amention in another thread

https://access-programmers.co.uk/forums/showthread.php?p=1571387&posted=1#post1571387

A pdf opens with Foxit inside the control, but Word and Excel opene outside the control. Text files are also inside the control.

I am only on 2007, so do I still need to import the reg file?

TIA

here is a sample Office Documents
Viewer. it can view (and edit), Word
documents, excel worksheet/workbook, powerpoint,
text files (untouched), and pdfs.

it uses WebBrowser control. in case
the office documents run "outside" the webcontrol
(not being hosted), as in the case of Newer office
(office 2013-16), just run the .reg file then
try again to view those files.

Created in a2016 x64.

enjoy.
 
Status
Not open for further replies.

Users who are viewing this thread

Top Bottom