|
下面这段程序好像没用到啊,应该是实现的另一种方法,就是用TXT文件来保存字符。
这是原文件中有的吗?还是哪位加上去的?
Sub LoadVideo() '装载视频
Dim i As Long
Dim impFile, temp, vFrame As String
Dim fs, fi
Set fs = CreateObject("Scripting.FileSystemObject")
Sheet1.Range("Q:Q").ClearContents
'LOGO
impFile = ThisWorkbook.Path & Application.PathSeparator & _
"logo-outline.txt"
Set fi = fs.OpenTextFile(impFile, 1)
'Read the logo file
i = 99
vFrame = ""
Do While fi.AtEndOfStream <> True
temp = fi.ReadLine
vFrame = vFrame & temp & vbLf
Loop
'Use Q99 for the logo
Sheet1.Cells(i, 17).Value = vFrame
fi.Close
'VIDEO
impFile = ThisWorkbook.Path & Application.PathSeparator & _
"12fps-45sec-cut.txt"
Set fi = fs.OpenTextFile(impFile, 1)
'Read the video file
i = 100
vFrame = ""
Do While fi.AtEndOfStream <> True
temp = fi.ReadLine
vFrame = vFrame & temp & vbLf
If temp = "" Then
Sheet1.Cells(i, 17).Value = vFrame
vFrame = ""
i = i + 1
End If
Loop
fi.Close
Set fs = Nothing
Set fi = Nothing
End Sub |
|