Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2018
    Location
    City: Contagem / State: Minas Gerais / Country: Brazil
    Posts
    6

    Viewing files content inside MS-Access form

    Dear All,


    I need to develop an app using MS-Access 2016 that allows to view (content) several kinds of files [*.xlsx (MS-Excel), *.docx (MS-Word), *.msg (MS-Outlook) and PDF] INSIDE of the form (something like the MS Windows Explorer). I ask you to support me to solve this issue.




    Best Regards,


    Wanderley Egídio
    From Brazil

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,119
    The obvious question is why?

    You could probably use a web browser control for much of this idea

    BUT why not open them in the default applications?
    OR import the data into Access and display as a regular form?

  3. #3
    Join Date
    Jan 2018
    Location
    City: Contagem / State: Minas Gerais / Country: Brazil
    Posts
    6
    Hi, "ridders52". I thank you for your quick answer. I will try explain better [using a sample] why I need to implement this solution and if you have suggestions feel free to give me them.

    Sample: I filed a document (pdf for example) inside my database. Inside this document I have a lot of informations that I need catch from it (by reading) and tranfer for my database. I intent to have in my form an area where I can read line by line this document (e.g. on top of my screen) and below I have several fields to fill out with data that I read in cited document (pdf). These documents can be from Adobe (*.PDF), MS-Word (*.docx), MS-Excel (*.xlsx) or MS-Outlook (*.eml).

    P.S.: My customer cannot use regular windows from MS-Windows to do this. They require that I include these views inside the form.

    I hope I have been clearer this time and I count on your cooperation to solve this issue.

    I thank all in advance for your support.

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,119
    Its very easy to open ANY file from Access
    So you could have a form with a listbox listing any external files you want to view.
    Then add code so when you click an item in the listbox, it is automatically opened using the default application.
    That will definitely work for PDF, DOCX, XLSX an probably for Outlook EML files though I've never tried this

    The attached file modHandleFiles contains a function fHandleFiles for this purpose
    modHandleFiles.txt

    Import the entire file to a standard module
    Then run code like this from Access

    Code:
    Dim strFilePath As String
    
    'set the full file path to the file you want to open
    strFilePath = "c:\MyFiles\MyPDFFiles\MyExampleFile.PDF" 
    
    Call fHandleFile(strFilename, WIN_NORMAL)
    Alternatively, as I said previously, a web browser control can be used for a wide variety of content - online or otherwise
    Suggest you search this site or Google for how to use this control in Access

    The screenshot shows one such example - ideal for PDF & perhaps suitable for Word doc?

    Click image for larger version. 

Name:	WebBrowserForm.PNG 
Views:	21 
Size:	89.5 KB 
ID:	31867


    However, I don't think Excel files should be treated in this way - they can be imported or linked to your database
    When you do this, the Excel file is in effect another table

    You can also import Outlook folders to Access

    This site is good for linking access to other Office programs:
    http://www.helenfeddema.com/Code%20Samples.htm

    Good luck

  5. #5
    Join Date
    Jan 2018
    Location
    City: Contagem / State: Minas Gerais / Country: Brazil
    Posts
    6
    Hi "ridders52"

    Sorry, but I think that I was not enough clear, but actually I need show the document content INSIDE form like ilustrated in bellow image [I read data in pdf document and typing in fields, both at form]:

    Click image for larger version. 

Name:	Nova Imagem de Bitmap.jpg 
Views:	20 
Size:	173.3 KB 
ID:	31870

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,119
    I understood that perfectly the first time I replied
    If you really want to do this, use a web browser control as already mentioned
    However, in my opinion there are better ways of achieving the same result

    I've also spotted that you have also cross posted this thread at :https://www.access-programmers.co.uk...62#post1560562


    As I wrote in your other post, please follow forum etiquette if you do cross-post to prevent people wasting time repeating existing answers:
    i.e.. State you have done so & provide a link to the other post

  7. #7
    Join Date
    Jan 2018
    Location
    City: Contagem / State: Minas Gerais / Country: Brazil
    Posts
    6

    Viewing files content inside MS-Access form

    First of all, I am so sorry for cross posted thread several time but I had believe to be using differents forums and I have searched intensely this solution. Also, I am starting to study MS-Access and to use forums like this. and my English level is not so good, too. I really apologize for this again for you and all collegues of this forum.

    I thank you a lot if you can to send me more details about your comments guiding me step-by-step me to get the result hoped:


    a) Using the web browse control [main doubt: I tried to use it to open the external file as I need putting its path in my PC (e.g. "C:\My documents\DocToTest.docx") and when I run it, it asked me to save this document and open it in MS-Word instead of show it inside my form as I would like.

    b) I would like to hear you which better ways of achieving the same result then I kindly ask you to detail these ways.

  8. #8
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,119
    Quote Originally Posted by Wanderley Egídio View Post
    First of all, I am so sorry for cross posted thread several time but I had believe to be using differents forums and I have searched intensely this solution. Also, I am starting to study MS-Access and to use forums like this. and my English level is not so good, too. I really apologize for this again for you and all collegues of this forum.

    I thank you a lot if you can to send me more details about your comments guiding me step-by-step me to get the result hoped:


    a) Using the web browse control [main doubt: I tried to use it to open the external file as I need putting its path in my PC (e.g. "C:\My documents\DocToTest.docx") and when I run it, it asked me to save this document and open it in MS-Word instead of show it inside my form as I would like.

    b) I would like to hear you which better ways of achieving the same result then I kindly ask you to detail these ways.
    Firstly they are different forums ... but many of us answer questions on several forums
    There isn't an issue with cross-posting as such - just follow the guidelines

    See post #4 for better ways of doing this such as fHandleFile function
    If that doesn't meet your needs, do a search for example databases using web browser forms

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Problem Viewing PDF files in Access 2016
    By Robert2150 in forum Access
    Replies: 4
    Last Post: 09-23-2017, 01:05 PM
  2. Viewing content of long text cells
    By mglevicky in forum Access
    Replies: 3
    Last Post: 01-23-2017, 09:38 AM
  3. Make MS Access Form Online and viewing in browser
    By pritesharyan in forum Access
    Replies: 4
    Last Post: 03-22-2015, 11:30 AM
  4. Replies: 3
    Last Post: 12-04-2014, 10:12 AM
  5. PDF File content display on Access 2013 form
    By saleemsadique in forum Access
    Replies: 7
    Last Post: 02-07-2014, 06:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums