tbakbradley
Board Regular
- Joined
- Sep 24, 2010
- Messages
- 142
I have a spreadsheet that will auto send an email, attaching the current spreadsheet after the user is asked to save the document. The email works fine with everything hardcoded. I even included email addresses on another spreadsheet on a server that this WB points to so the To and CC are always up to date Incase someone needs to update who we send the email to.
I was hoping I could store the .HTMLBody section I currently have hardcoded into a cell elsewhere on the Workbook. Ultimately I’d store it on another Workbook on a server and point there, but for this example, I’ll use the same workbook
Within the macro, I have set this variable, however, I did not declare this variable anywhere.
Subj= Sheets(“Sheet1”).Range(“A1”).Value
Where this cell, I just copied the hardcoded htmlbody section that works fine, and pasted into A1. That includes all the quotation marks, html tags etc.
Then I have
.htmlbody = Subj
Nothing comes over into the body of the email so I may not be able to handle it this way. My hope was to store the htmlbody elsewhere, with all the tags, and point to it. That way, if we had a reason to change the common body for this email, I could update it on that cell.
Sorry for the sloppiness here. I’m on my phone and not near my work PC.
I was hoping I could store the .HTMLBody section I currently have hardcoded into a cell elsewhere on the Workbook. Ultimately I’d store it on another Workbook on a server and point there, but for this example, I’ll use the same workbook
Within the macro, I have set this variable, however, I did not declare this variable anywhere.
Subj= Sheets(“Sheet1”).Range(“A1”).Value
Where this cell, I just copied the hardcoded htmlbody section that works fine, and pasted into A1. That includes all the quotation marks, html tags etc.
Then I have
.htmlbody = Subj
Nothing comes over into the body of the email so I may not be able to handle it this way. My hope was to store the htmlbody elsewhere, with all the tags, and point to it. That way, if we had a reason to change the common body for this email, I could update it on that cell.
Sorry for the sloppiness here. I’m on my phone and not near my work PC.
Last edited: