SCMHC
asked on
Why does the save diaglog box appear when the document is opened for printing only. No changes to the document was made.
I have several word documents that I open, print and close from an Excel macro. The macro works perfectly except for on document which hangs up because before the document closes, the save dialog box opens and is waiting for a response. I have re-typed this document several times and each time this document does the same thing. How can I get this document to close without saving. I have unchecked everything in the Options. Below is the vba code and attached is the document.
thanks all for the assist.
Dim TotDocs As Integer
Dim MyDoc As String
Sub Button1_Click()
TotDocs = Sheets("Info").Range("a1")
For Count = 1 To TotDocs
MyDoc = Sheets("Documents").Range( "A" & Count)
Set wrdApp = CreateObject("word.applica tion")
Set wrdDoc = wrdApp.Documents.Open(MyDo c)
wrdDoc.PrintOut
wrdDoc.Close
wrdApp.Quit
Next Count
End Sub
305a---Appendix-A-Self-Preservat.docx
thanks all for the assist.
Dim TotDocs As Integer
Dim MyDoc As String
Sub Button1_Click()
TotDocs = Sheets("Info").Range("a1")
For Count = 1 To TotDocs
MyDoc = Sheets("Documents").Range(
Set wrdApp = CreateObject("word.applica
Set wrdDoc = wrdApp.Documents.Open(MyDo
wrdDoc.PrintOut
wrdDoc.Close
wrdApp.Quit
Next Count
End Sub
305a---Appendix-A-Self-Preservat.docx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks again :-)