Tbomb65
05-29-2017, 01:13 PM
Team,
I am trying to add into the body of an already open email (Be it a reply or a new email) at whichever point the cursor currently is an "attachment as text" using VBA. In this case the text is recorded in word.
Effectively I want to automate doing the Attach File > Insert As Text command and specify a file path so that I can create a button that allows a one click solution
I have found lots of code that adds it as an attachment to the email, or even creates a new email but nothing specifically for what I am wanting.
Hoping to utilise this line of code which I found for a template creation macro which changes the source file destination address based on the user environments name. Kinda cool I thought, but without that I will manage fine.
Set newItem = Application.CreateItemFromTemplate("C:\Users\" & Environ("UserName") & "\AppData\Roaming\Microsoft\Templates\example.docx")
Any help would be great.
Cheers,
I am trying to add into the body of an already open email (Be it a reply or a new email) at whichever point the cursor currently is an "attachment as text" using VBA. In this case the text is recorded in word.
Effectively I want to automate doing the Attach File > Insert As Text command and specify a file path so that I can create a button that allows a one click solution
I have found lots of code that adds it as an attachment to the email, or even creates a new email but nothing specifically for what I am wanting.
Hoping to utilise this line of code which I found for a template creation macro which changes the source file destination address based on the user environments name. Kinda cool I thought, but without that I will manage fine.
Set newItem = Application.CreateItemFromTemplate("C:\Users\" & Environ("UserName") & "\AppData\Roaming\Microsoft\Templates\example.docx")
Any help would be great.
Cheers,