[VB6 ] 背景列印的問題!?

看板Visual_Basic作者 (lucky0623)時間18年前 (2008/03/05 22:31), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/1
這是我在書上看到的一段程式 他是背景列印的程式 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

03/06 09:40, , 1F
thisDoc.PrintOut <<我在猜可能是有Function,找找原來PO的
03/06 09:40, 1F
文章代碼(AID): #17pgxFfv (Visual_Basic)
文章代碼(AID): #17pgxFfv (Visual_Basic)