Consulting

Results 1 to 6 of 6

Thread: RE: Insert/Embed outlook mail using vba Excel

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    RE: Insert/Embed outlook mail using vba Excel

    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!
    Last edited by Aussiebear; 06-21-2022 at 02:23 AM. Reason: added correct code tags for submitted code

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •