Charlotte Foust
charlotte.foust at gmail.com
Mon Oct 11 11:35:40 CDT 2010
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
>
>