Generic Office document viewer

Status
Not open for further replies.

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 05:09
Joined
May 7, 2009
Messages
20,232
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

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?
 
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
 
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

Back
Top Bottom