How does one open word document (.dotm) programmatically from Access Form? RRS feed

  • Question

  • I've got a form used for inspections; in process of performing an inspection a user may need to create a word document.  To do so I'm using a 'Command Button' with a hyperlink to the document's location on the network 'Z:\folder\forms\Form039.dotm' But when opened using the hyperlink the document opens titled 'Form039' at the top, not 'Document1' as it does when opened manually on the network.  How can I used VBA automation with my 'Command Button' to open the Word doc programmatically so that it functions properly?



    Thursday, July 6, 2017 1:53 PM

All replies

  • Hi jms,

    Are you saying the text is a hyperlink field, or are you using some code to open the template file? If so, can you show us the code? Thanks.

    Thursday, July 6, 2017 2:47 PM
  • If you are trying to create a new Word document from a document template then see the below link:


    It's for the older document type but can be adapted for the Office XML document type.

    Paul ~~~~ Microsoft MVP (Visual Basic)

    Thursday, July 6, 2017 3:59 PM