首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 办公应用 > OFFICE教程 >

怎么用Excel VBA获得AVI文件的持续时间

2012-03-27 
如何用Excel VBA获得AVI文件的持续时间?我有好多avi文件,资源管理器里可以显示每个文件的播放持续时间.我

如何用Excel VBA获得AVI文件的持续时间?
我有好多avi文件,资源管理器里可以显示每个文件的播放持续时间.
我想统计那些时间:求和,排序等.

请问我该怎么实现?

谢谢!

[解决办法]
没找到这个要用到的API函数
[解决办法]
Declare Function mciSendString Lib "winmm" Alias "mciSendStringA" (ByVal _
lpstrCommand As String, ByVal lpstrReturnString As String, _
ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long

CommandString = "Open " & FileName" & " alias MediaFile"
mciSendString CommandString, vbNullString, 0, 0&



Dim MediaLength as Long
Dim RetString As String * 256
Dim CommandString As String

CommandString = "Set MediaFile time format milliseconds"
mciSendString CommandString, vbNullString, 0, 0&
CommandString = "Status MediaFile length"
MciSendString CommandString, RetString, Len(RetString), 0&
MediaLength = CLng(RetString)


CommandString = "Close MediaFile"
MciSendString CommandString, vbNullString, 0, 0&


QQ群 48866293 OFFICE应用挖掘 
MS OFFICE(ACCESS\EXCE\WORD等应用技术探讨与交流!技术群,请阅群论坛中的《踢人规则》

热点排行