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!
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!
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.
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.
<!--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.