Results 1 to 2 of 2
  1. #1
    oldlearner is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2015
    Posts
    31

    Can I use a button on a form to open a word document?


    Hi all - I have a report in word which has graphs and data from my database. Am I able to add a button onto my database form that opens the word document. Is a Macro the best way? if so what instruction do I need to use.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,967
    Try FollowHyperlink() intrinsic function in VBA.

    FollowHyperlink("folderpath\filename.doc")

    Review: http://allenbrowne.com/func-GoHyperlink.html

    or call Windows Shell.

    Dim wsShell As Object
    Set wsShell = CreateObject("WScript.Shell")
    wsShell.Run Chr(34) & "folderpath\filename.doc" & Chr(34)
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 3
    Last Post: 05-22-2014, 09:23 AM
  2. Replies: 1
    Last Post: 01-24-2014, 01:21 PM
  3. Replies: 3
    Last Post: 02-22-2013, 06:41 AM
  4. Embed word document into form
    By jgelpi16 in forum Forms
    Replies: 4
    Last Post: 06-26-2012, 11:31 AM
  5. Open a word document from access
    By natalia in forum Programming
    Replies: 1
    Last Post: 10-13-2010, 08:04 AM

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