Rocky Smolin
rockysmolin at bchacc.com
Mon Oct 11 11:47:44 CDT 2010
Yep. The exact format is objWord.Documents.Close SaveChanges:=wdDoNotSaveChanges. Thanks for the lead. BTW nosave is not in the Help system. I use Google for all Access help now. Search on 'word vba nosave' popped the answer up without even having to open the page - it was right there in the brief description on the first link. Best, Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Monday, October 11, 2010 9:36 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Normal.dot file altered on close? I seem to recall a NoSave argument to the close document operation. Charlotte Foust On Mon, Oct 11, 2010 at 9:18 AM, Rocky Smolin <rockysmolin at bchacc.com> wrote: > Dear List: > > I automated some customer response letter in my customer tracking > system - opens a word , inserts the contents into the body of an > email, closes the doc. When the doc closes, though, I get a notice > that normal.doc has been altered do I want to save it, etc. PITA > because of course, I have to respond to the prompts. > > What am I doing wrong? The code's pretty minimal: > > > > Private Sub MakeMessage(argDocument As String, argSubject As String) > > > Dim objWord As Object > Dim objWordDoc As Word.Document > > Dim objOutlook As Outlook.Application > Dim objOutlookMsg As Outlook.MailItem > Dim objOutlookRecip As Outlook.Recipient > Dim objOutlookAttach As Outlook.Attachment > > ' Get the body text > Set objWord = CreateObject("Word.Application") > objWord.Documents.Open (argDocument) > objWord.Selection.WholeStory > strBody = objWord.Selection > 'MsgBox strBody > objWord.Documents.Close > objWord.Quit > Set objWord = Nothing > > > (code here to send email - working well > > End Sub > > > > > > MMTIA, > > Rocky Smolin > > Beach Access Software > > 858-259-4334 > > Skype: rocky.smolin > > www.e-z-mrp.com <http://www.e-z-mrp.com/> > > www.bchacc.com <http://www.bchacc.com/> > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com