如题所述
1. 点击菜单栏中的“工具(T) -> 宏(M)-> 宏(M)”,调出“宏”窗口,按照图示,随便输入一个名字,然后点击“创建”
2.
2. 弹出窗口中的内容替换为下面代码。
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", , "选择要提取FLash的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
3. 输入完毕后,按F5键运行,出现如下窗口,选择含有Flash的Excel或Word文件打开。
4. 弹出窗口如下,选择“确定”。
5. 在该Excel或Word存放位置处就出现了提取出来的Flash文件(这里为”游戏.swf”).追问
2.
2. 弹出窗口中的内容替换为下面代码。
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", , "选择要提取FLash的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
3. 输入完毕后,按F5键运行,出现如下窗口,选择含有Flash的Excel或Word文件打开。
4. 弹出窗口如下,选择“确定”。
5. 在该Excel或Word存放位置处就出现了提取出来的Flash文件(这里为”游戏.swf”).追问
这个提出来没有显示啊,提是提 出来了,
追答没显示什么啊?梅花是点击鼠标才显示的啊,鼠标要放在枝头上点击的,你再试试哈
追问这是在EXCLE里边截出来的,像你说的那样的方法是能给提出来,可是提出来之后就什么都没有,这个图都没有,只有一片白。这个文件看起来像是flash,可是现在成那样子,都不明白是不是flash 了。
追答你用迅雷看看打开,或者其它的影音软件打开,不要用图片查看器打开哈
实在不行的话把你邮箱给我,我把提出来的flash发给你试试
温馨提示:答案为网友推荐,仅供参考
第1个回答 2012-01-01
找到链接地址不就可以了