Hi,
I really would like to know your opinion and exploit your expertise about a problem is annoying me since quite long time.
Which is the best way to display the content of a Word document inside an Acces form?
My scenario is quite simple and I'm sure a lot of you runned already in a similar one.
I want to file Word documents in an Access database a let the user scroll in a form all the records and all documents.
Actually is a litlle bit more compliated, but not much:
I'm really surprised that Microsoft dosn't provide developers an easier/simpler solution to integrate two of their more popular applications!
I still have three problems to tackle (unless I will receive, as I hope, some illuminating advise from you, ):
Of course I'm waiting for you opinions.
Lauro
I really would like to know your opinion and exploit your expertise about a problem is annoying me since quite long time.
Which is the best way to display the content of a Word document inside an Acces form?
My scenario is quite simple and I'm sure a lot of you runned already in a similar one.
I want to file Word documents in an Access database a let the user scroll in a form all the records and all documents.
Actually is a litlle bit more compliated, but not much:
- Word: 1 template(.dotm): 2 type of documents (.docx): whole documents and portions of documents.
- Access: 1 table and form for portions of documents (and metadata), 1 table and form for whole documents (and metadata).
- The user can create, search, display, modify portions both; insert part of document inside the whole one. After a parameter search, portions of (or whole) documents are shown in a Access form and the user can rapidly browse in their content.
- Ole Bound Object Frame
- First try, Microsoft adviced. But:
- If Word files saved inside a OneDrive sub folder impossible to link OLE Object.
- If Word template contains a ActiveDocument reference in its Document_Open routine error 4248 occurs, even only records navigating.
- Beside why to store an OLE Object, if I could store only its FullName?
- Ole Unbound Object Frame
- I change the Source Control on Current event.
- I'm spared to have the OLE object in Access table but, the other problems are still there.
- Web Browser Control for PDF version
- A word document cannot be displayed inside the form, only saved/downloaded.
- I can modify my Document.Save command and everytime the user save the docx file also the pdf is saved. So I can shown in the Web Browser Control the PDF version. Fine, but
- Sometime a (0:521) error is arised by Acrobat Reader (in Windows 11, Microsoft 365) (in old laptop with Windows 8 and Office 2010 no problem)
- Web Browser Control for HTM version
- I can modify my Document.Save command and everytime the user save the docx file also the HTM is saved (a little more burdensome because also a sub folder with images are saved).
- I can shown in the Web Browser Control the HTM version without problem until now. But
- I do not have Header/Footer and page brakes.
- AcroPDF.PDF.1 Viewer for PDF version
- I didn't succed in register the OLE server (on Windows 11, Microsoft 365) , I didn't succed to set the right reference to Source Control (on Windows 8 and Office 2010). I saved myself the trouble to solve those problem because I thought
- I don't want the user to be involved in a lot of problems.
I'm really surprised that Microsoft dosn't provide developers an easier/simpler solution to integrate two of their more popular applications!
I still have three problems to tackle (unless I will receive, as I hope, some illuminating advise from you, ):
- Include in the modified Document Save command of Word the routine to insert page breaks, headers, footers of the docx version?
- How to avoid the flickering of webpage/print view changes after the htm saving of the doc? The Application.ScreenUpdating = True/False doesn't work fine.
- Saving all the documents in the two formats (with nowdays storage should not be a big concern) or save only the docx version and when the paramer query tell which files should be displayed save them as htm in a temp folder?
- But before the form is usable by the user (a lot of time: around 2 seconds each files on my system) or
- Save as htm only, let's say, 5 files, let with Do Events finish the others while user is watching the first one (I think to compliacated and sourde of problems)
Of course I'm waiting for you opinions.
Lauro