Results 1 to 4 of 4
  1. #1
    sstrauss87 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2011
    Posts
    29

    Question Openning a .doc file through Microsoft access ribbons


    I was wondering if anyone knew of a module that would open a word document. Also, If that module could be linked to a ribbons menu item. Thanks for any ideas!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,603
    What do you mean by 'a module'. Code can be written to open Word document. Can also create customized button on Quick Access Toolbar or a custom ribbon.

    Search this forum or Google common topics:
    Access 2007 VBA open Word document
    Access 2007 VBA hyperlink
    Access 2007 VBA custom ribbon toolbar
    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.

  3. #3
    sstrauss87 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2011
    Posts
    29
    That's good news. I already have many custom ribbon tool-bars. I was just trying to find some code for a module to open a path, then maybe make a ribbon button that would call a macro and pass the specific path to the module. does that sound doable?
    Last edited by sstrauss87; 02-20-2012 at 12:58 PM.

  4. #4
    sstrauss87 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2011
    Posts
    29
    <!--Start Module Code-->
    Public Function OpenDocument(docPath As String)
    Dim docApp As Object

    Set docApp = CreateObject(Class:="Word.Application")
    docApp.Visible = True

    docApp.Documents.Open FileName:=docPath

    End Function

    <!--End Module Code-->

    <!--Macro-->
    Create a Macro
    Action = RunCode
    Arguments = OpenDocument('C:\Users\sstrauss\Desktop\Documentat ion Guide.doc')
    <!--End Macro-->

    <!--Ribbon Code-->
    <tab id="Documentation" label="Documentation">
    <group id="DocGrou1" label="Test">
    <button id="DocGroup1Button1" label="Test"
    imageMso="CreateForm"
    onAction='OpenEngSpec'/>
    </group>
    </tab>
    <!--End Ribbon Code-->
    Last edited by sstrauss87; 02-20-2012 at 12:59 PM.

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

Similar Threads

  1. How to embed excel file into Microsoft access database
    By apoorv in forum Import/Export Data
    Replies: 7
    Last Post: 08-19-2015, 08:38 AM
  2. Replies: 1
    Last Post: 09-13-2011, 01:52 PM
  3. openning database on another computer
    By rjriggins11 in forum Access
    Replies: 5
    Last Post: 02-22-2011, 02:25 PM
  4. Creating Custom Ribbons
    By disco_stu in forum Access
    Replies: 1
    Last Post: 07-13-2010, 06:10 PM
  5. Access 2007 - Hide Ribbons
    By FPeteE in forum Access
    Replies: 1
    Last Post: 11-17-2009, 03:55 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