Hi all

I currently have a macro that will open a new word doc and paste a selected excel range as an enhanced metafile. The next command is to open the email dialog box.

What I would like to do, is for the word application to close after sending the email. Currently word tries to shutdown at the same time as sending the email and comes back with a cannot close error. Is there a way of writing the macro that the code to quit word will only occur after sending or cancelling the email is complete.

code so far is below,

Dim wd As New Word.Application
Dim doc As New Word.Document
Dim rng As Range
Set wd = New Word.Application
Set doc = wd.Documents.Add
wd.Visible = False
Set rng = Range("GK665:GO713")
rng.Copy
wd.Selection.PasteSpecial DataType:=wdPasteEnhancedMetafile
With doc
.SendMail
End With
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveSheet.EnableSelection = xlUnlockedCells
ActiveWindow.ScrollRow = 661
ActiveWindow.ScrollColumn = 192
Range("GJ661").Select
wd.Quit


Any help would be appreciated