Have you ever checked in Task Manager to see if there are multiple
instances of Word running?
I don't do much programming with Word,
but the following modified code may work a little better.
(it is untested)
--
Jim Cone
San Francisco, USAhttp://
www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)
'----
Sub Button13_Click()
Dim wdApp As Object
Dim sFname As String
'File Location
sFname = "R:\SALES\Quote Generators\Quotes\2 Pass Tray\2 Pass Tray Quote.doc"
Set wdApp = CreateObject("Word.Application")
'Opens File
wdApp.Documents.Open Filename:="R:\SALES\Quote Generators\Quotes\2 Pass Tray\2 Pass Tray Quote.doc"
wdApp.Visible = True
SendKeys "{Left} {Enter}" 'Updates File
Set wdApp = Nothing
'The Word application is left open.
End Sub
'----------
'Printing:
Sub Button12_Click()
'Prints Rating Sheet to PDF
Sheet9.PrintOut Copies:=1, ActivePrinter:="Adobe PDF", Collate:=True
'Prints Costing Sheet to PDF
Sheet8.PrintOut Copies:=1, ActivePrinter:="Adobe PDF", Collate:=True
'Prints Guarantee to PDF
Dim wdApp As Object
Dim wdDoc As Object
Dim sFname As String
sFname = "R:\ADMINISTRATON\Standard Guarantee.doc" 'File Location
Set wdApp = CreateObject("Word.Application")
'Opens File"
Set wdDoc = wdApp.Documents.Open(Filename:="R:\ADMINISTRATION\Standard Guarantee.doc")
wdApp.ActivePrinter = "Adobe PDF" 'Sets Adobe PDF to printer
wdDoc.PrintOut 'Prints File
Application.Wait Now + TimeValue("00:00:04") 'Holds open for 4 seconds
wdDoc.Close savechanges:=False 'closes document and doesn't save changes
Set wdDoc = Nothing
'Prints Quote as PDF
sFname = "R:\SALES\Quote Generators\Quotes\2 Pass Tray\2 Pass Tray Quote.doc"
'Opens File
Set wdDoc = wdApp.Documents.Open(Filename:="R:\SALES\Quote Generators\Quotes\2 Pass Tray\2 Pass Tray Quote.doc")
SendKeys "{Left} {Enter}, False" 'Updates File
wdDoc.PrintOut 'Prints File
Application.Wait Now + TimeValue("00:00:04") 'Holds open for 4 seconds
wdDoc.Close savechanges:=False 'closes documentand doesn't save changes
Set wdDoc = Nothing
wdApp.Quit 'closes Word
Set wdApp = Nothing
End Sub
'----------
OK, fair point.. I just really wanted to know if it was just how crap
the pc was... here's the code:
-snip-- Hide quoted text -
- Show quoted text -