Hello, I am trying to add one file with vba macro and for this use path from excel sheet in cell B24
Basically I am trying to add C:\Users\%userprofile%\AppData\Local\Temp\Test.zip as this file will be used by multiple users
If I put my user name in path instead of %userprofile% attachment works
How I can trick this path to make sure that any user can use this macro?
Basically I am trying to add C:\Users\%userprofile%\AppData\Local\Temp\Test.zip as this file will be used by multiple users
If I put my user name in path instead of %userprofile% attachment works
How I can trick this path to make sure that any user can use this macro?
VBA Code:
With OutMail
.To = ThisWorkbook.Sheets("Settings").Range("B15").Value
.CC = ""
.BCC = ""
.Subject = ThisWorkbook.Sheets("Settings").Range("B18").Value
.HTMLBody = strbody1 & signature
'.Attachments.Add ActiveWorkbook.Sheets("Settings").Range("B24").Value
.Display
ActiveInspector.CommandBars.ExecuteMso ("CheckNames")