后退 刷新 前进 收藏 顶部 |   知道 黑匣子 富媒体 技术服务

导出xls中的flash.(舒克)

软件应用 Office ... (shuke.2013-03-09 01:31)
导出xls中的flash.(舒克)
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



☆ 回复1:上面的代码放到 宏里,运行就可以了,木有一点问题,貌似所有的OFFICE里都可以转出FLASH出来的。

进度:100% 返回软件应用

htaccess文件(或者"分布式配置文件")的用法.

图片新热点

导航


目录


    站内搜索
    首页 | W3C | ME