Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2013
    Posts
    5

    Unanswered: Opening template files from Access

    I'd like to create a central library for our company files on Access, which would open them as Windows Explorer does. I've tried hyperlinking, which opens pdf, doc files etc ok, but if I link to a MS template file (dotx etc), it opens up the original file, and not a new file.

    Is there any script or suchlike I can use, so that clicking on them would open up a new instance, in the same way that double-clicking in Explorer does?

    Any help/ideas greatly appreciated.

  2. #2
    Join Date
    Feb 2013
    Posts
    5
    I've been plugging away with this, and found that writing a script has achieved what I've wanted, to a certain extent (ie: it opens the template as a new file):

    Private Sub Command20_Click()
    stAppName = "C:\Windows\explorer.exe ""N:\QUALITY MANAGEMENT\TEMPLATES\WORD\LETTER.dotx"""
    Call Shell(stAppName, 1)

    Exit_cmdExplore_Click:
    Exit Sub

    Err_cmdExplore_Click:
    MsgBox Err.Description
    Resume Exit_cmdExplore_Click
    End Sub

    However, I'd like the filepath to vary by record, so that every record can open their respective files. I've tried something similar below, but it's not working - possibly because there's spaces in the filepath. Has anyone got ideas?

    Private Sub Command15_Click()

    stAppName = "C:\Windows\explorer.exe Me.TemplateLocation"


    Call Shell(stAppName, 1)

    Exit_cmdExplore_Click:
    Exit Sub

    Err_cmdExplore_Click:
    MsgBox Err.Description
    Resume Exit_cmdExplore_Click
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •