Mitsules, Mark
Mark.Mitsules at ngc.com
Wed Nov 10 10:17:51 CST 2004
My memory is a little fuzzy on this issue.
Will this work?
m_objWord.Options.PrintBackground = True
Mark
-----Original Message-----
From: ACTEBS [mailto:actebs at actebs.com.au]
Sent: Wednesday, November 10, 2004 10:28 AM
To: Access Group (E-mail)
Subject: [AccessD] Wait For Word To Finish Printing
Guys,
I have a function that prints out numerous Word documents on the fly which I
loop through. The problem is the print job hasn't finished and a dialogue
box pops up suggesting that "If you close word now the document print job
will be cancelled"
The code is as follows:
With m_objWord
.ActiveDocument.SaveAs strWrdPath
If gBoolPrintOrNot = True Then
.ActiveDocument.PrintOut
DoEvents
End If
.ActiveDocument.Close
End With
m_objWord.Quit
Set m_objDoc = Nothing
Set m_objWord = Nothing
It works well other than I have to close after I am finished as I don't want
to leave variables in memory. Is there any way to wait until word has
finished it's job?
I have tried Dev's "ShellWait" function, but that is more geared to batch
files rather than a windows app, and it's not the word document that is the
process, it's word that is executing the process....
Any guidance much appreciated...
Vlad
--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com