Add attachment with varying date in file name to Outlook mail

前端 未结 5 1502
无人共我
无人共我 2020-12-10 23:25

I have an Excel file named \"Home Audio for Planning (28-3-2013).

The date will change every day but the text will be the same.

How do I attach those files t

5条回答
  •  [愿得一人]
    2020-12-11 00:26

    Did you try to change the attachemnt name dynamic. For ex;

    .Attachments.Add ("C:\Users\Desktop\Today\Home Audio for Planning   (" + timeVariable  + ").xlsx")
    

    and you can set the time variable before to match the date of the date in the required format.

    Cheers

提交回复
热议问题