Hi,
Here is code I found on Chines site for extracting SWF Small Web Format file from Excel and Word.
http://cat14051.mysinablog.com/index...ticleId=555049HTML Code:
Hi,
Here is code I found on Chines site for extracting SWF Small Web Format file from Excel and Word.
http://cat14051.mysinablog.com/index...ticleId=555049HTML Code:
Last edited by shukla.ankur281190; 04-24-2018 at 06:11 AM.
Hi,
Here is code I found on Chines site for extracting SWF Small Web Format file from Excel and Word.
HTML Code:
Sub ExtractFlash()
Dim tmpFileName As String, FileNumber As Integer
Dim myFileId As Long
Dim myArr() As Byte
Dim i As Long
Dim MyFileLen As Long, myIndex As Long
Dim swfFileLen As Long
Dim swfArr() As Byte
tmpFileName = Application.GetOpenFilename("office File(*.doc;*.xls),*.doc;*.xls", , "確定要分析的 Office 檔")
If tmpFileName = "False" Then Exit Sub
myFileId = FreeFile
Open tmpFileName For Binary As #myFileId
MyFileLen = LOF(myFileId)
ReDim myArr(MyFileLen - 1)
Get myFileId, , myArr()
Close myFileId
Application.ScreenUpdating = False
i = 0
Do While i < MyFileLen
If myArr(i) = &H46 Then
If myArr(i + 1) = &H57 And myArr(i + 2) = &H53 Then
swfFileLen = CLng(&H1000000) * myArr(i + 7) + CLng(&H10000) * myArr(i + 6) + CLng(&H100) * myArr(i + 5) + myArr(i + 4)
ReDim swfArr(swfFileLen - 1)
For myIndex = 0 To swfFileLen - 1
swfArr(myIndex) = myArr(i + myIndex)
Next myIndex
Exit Do
Else
i = i + 3
End If
Else
i = i + 1
End If
Loop
myFileId = FreeFile
tmpFileName = Left(tmpFileName, Len(tmpFileName) - 4) & ".swf"
Open tmpFileName For Binary As #myFileId
Put #myFileId, , swfArr
Close myFileId
MsgBox "以" & tmpFileName & "名字保存"
End Sub
http://cat14051.mysinablog.com/index...ticleId=555049
If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks