Una famiglia di sistemi di gestione per database relazionali di Microsoft progettati per semplificare l'uso.
ciao Francesca,
prova così:
in modulo standard:
Public Function FileExists(strPathFile As String) As Boolean
On Error Resume Next
FileExists = ((GetAttr(strPathFile) And vbDirectory) = 0)
End Function
Public Sub openPrintFileName(ByVal strFullPath As String, ByVal strMode As String)
CreateObject("Shell.Application").Namespace(0).ParseName(strFullPath).InvokeVerb (strMode)
End Sub
per aprire il file da command button cmdOpen supponendo che il fullPath del file sia mostrato nella textBox fullPathPDFfile:
Private Sub cmdOpen_Click()
If FileExists(Me.fullPathPDFfile) Then openPrintFileName Me.fullPathPDFfile, "open"
End Sub
per stampare il file da commad button cmdPrint sempre supponendo che il fullPath del file sia mostrato nella textBox fullPathPDFfile:
Private Sub cmdPrint_Click()
If FileExists(Me.fullPathPDFfile) Then openPrintFileName Me.fullPathPDFfile, "print"
End Sub
ciao, Sandro.