PDA

View Full Version : RE: Insert/Embed outlook mail using vba Excel



Keerthi@21
06-20-2022, 11:06 PM
Hi Folks,


I would need to perform additional task along existing steps which i have mentioned below for your reference:

Existing step:
I would need your help to insert the outlook email message(saved in the same path as of my macro file) as object into the excel worksheet.


Addiontal task:
1) I would need to attach 3 more files in the same email message which i am about to add as object in VBA excel worksheet.
2) Name of the email message and workbooks to be attached should be dynamic (all the files will be saved in same folder of macro file).


Could you please help whether the above steps are also possible to include in this code:


Dim XPath As String
Dim Email As String
XPath = Application.ActiveWorkbook.Path
Email = XPath & "\Monthly sales.msg"
ActiveSheet.OLEObjects.Add(Filename:=Email, Link:=False, DisplayAsIcon:=True, IconFileName:= _
"C:\WINDOWS\system32\packager.dll", IconIndex:=2, IconLabel:= _
"Monthly sales.msg").Select
Range("K7").Select







If the possibility is yes, Please help out with code!

macropod
06-21-2022, 12:31 AM
Kindly don't post the same question in multiple threads. Stick with your original thread:
RE: Insert/Embed outlook mail using vba Excel (vbaexpress.com) (http://www.vbaexpress.com/forum/showthread.php?70001-RE-Insert-Embed-outlook-mail-using-vba-Excel)
Thread closed.