作者lucky0623 (lucky0623)
看板Visual_Basic
标题[VB6 ] 背景列印的问题!?
时间Wed Mar 5 22:31:40 2008
这是我在书上看到的一段程式 他是背景列印的程式
Dim WordApp As Word.Application
Dim thisDoc As Document
Dim prnTime As Date
Dim breakLoop As Boolean
Set WordApp = CreateObject("Word.Application")
WordApp.Visible = False
Wordpp.Document.open ("C:\新增.doc")
thisDoc.PrintOut True, True
prnTime = Time
breakLoop = False
While WordApp.BackgroundPrintingStatus <> 0 And Not breakLoop
If Minute(Time - prnTime) > 1 Then
Reply = MsgBox("Word is takeing too long to print." & vbCrLf &
"Do you want to quit?", vbTesNo)
If Reply = vbYes Then
breakLoop = True
Else
prnTime = Time
End If
End If
Wend
WordApp.Quit
MsgBox "Document saved and printed!"
但是拿下去测试 却不能成功编译
後来我有修改过
能成功编译 WORD档也打得开 只是卡在thisDoc.PrintOut True, True这边
是哪里出问题了!?我找了很多本书也没讲到背景列印的方法
请各位板大帮忙看一下吧!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.127.70.37
1F:→ m9556:thisDoc.PrintOut <<我在猜可能是有Function,找找原来PO的 03/06 09:40