APRIRE FILE CON MACRO



  • APRIRE FILE CON MACRO
    di Alfio (utente non iscritto) data: 17/05/2015 21:38:33

    Ciao A tutti, come modifico la macro sotto per aprire il file a prescindere dal percorso che imposto ovvero spostando la cartella che contiene tutti i file come riesco comunque ad aprire il file???
     
    Sub Aprifile()
    Dim X As Long
    Dim strPath, strParam As String
    On Error Resume Next
    strPath = "G:EngineTEAM EGSPPROJECTGSP789GSP789.PDF"
    strParam = " /A " & Chr(34) & "page=3" & Chr(34) & strPath
    X = ShellExecute(0, "Open", "AcroRd32.exe", strParam, "", 1)



  • di lepat (utente non iscritto) data: 18/05/2015 13:04:57

    su excel si fa così, devi sostituire a ThisWorkbook l'oggetto giusto per powerpoint
     
    Sub openpdf()
    strPath = "G:EngineTEAM EGSPPROJECTGSP789GSP789.PDF"
    ThisWorkbook.FollowHyperlink strPath
    End Sub



  • di marxitpa data: 18/05/2015 16:12:58

    lepat ... ricorda che 'allegare il file subito fa perdere meno tempo a tutti'