Hi,
I currently use the following code to create a word document from within excel.
What I would like to now be able to do call outlook to generate and email, attach the word document and send the email.![]()
Sub ExcelRangeToWord() Dim WordApp As Object Dim WordDoc As Object Range("A141:AG173").Copy Set WordApp = CreateObject("Word.Application") Set WordDoc = WordApp.Documents.Add WordApp.Visible = True WordDoc.Select WordDoc.PageSetup.Orientation = 1 With WordDoc.PageSetup .Linenumbering.Active = False .TopMargin = (50) .BottomMargin = (50) .LeftMargin = (2) .RightMargin = (2) End With WordApp.Selection.PasteSpecial Link = False, DataType:=wdPasteEnhancedMetafile, _ Placement:=wdinline, DisplayAsIcon:=False End Sub
I can see various codes for sending excel documents or just emails from within excel but nothing that fits my need and anything I try to adapt wont work.
Anyone able to offer some help?
Thanks in advance
Bookmarks