ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need Help closing excel and documents (https://www.excelbanter.com/excel-programming/293325-need-help-closing-excel-documents.html)

Michael Wise

Need Help closing excel and documents
 
Here's my problem. I am running some Vb in excel and at
one point I open a word .dot to mail merge some
information. I would like to close the excel without
saving the workbook and close the .dot without saving it
as well. This should leave me with my open merged .doc.
Here is the code i'm at so far:

Dim WordApp As Object
Set WordApp = CreateObject("Word.Application")
WordApp.Documents.Open "c:\PSV Travelog\Travelog
Template.dot"
WordApp.Visible = True

What do I add to perform the above after this takes place.

No Name

Still Need Help closing excel and documents
 
Anyone
-----Original Message-----
Here's my problem. I am running some Vb in excel and at
one point I open a word .dot to mail merge some
information. I would like to close the excel without
saving the workbook and close the .dot without saving it
as well. This should leave me with my open merged .doc.
Here is the code i'm at so far:

Dim WordApp As Object
Set WordApp = CreateObject("Word.Application")
WordApp.Documents.Open "c:\PSV Travelog\Travelog
Template.dot"
WordApp.Visible = True

What do I add to perform the above after this takes

place.
.



All times are GMT +1. The time now is 09:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com