[AccessD] Automation Problem - Closing Word

Rocky Smolin at Beach Access Software rockysmolin at bchacc.com
Sat Apr 7 12:13:18 CDT 2007


Dear List:
 
I am getting the text of a document into a string variable from a word doc.
Then I want to close word.  I get the text of the document OK (which then
goes into an email). 
 
But with the code below, the document closes but Word says open.    How can
I get WORD closed up?
 
    Dim objWord As Object
    
    ' Get the body text
    Set objWord = CreateObject("Word.Application")
    objWord.Documents.Open (argDocument)
    objWord.Selection.WholeStory
    strBody = objWord.Selection
    'MsgBox strBody
    objWord.Documents.Close
    Set objWord = Nothing

 
MTIA
 
Rocky
 


 	
	



More information about the AccessD mailing list