View Single Post
 
Old 03-08-2020, 02:24 PM
BobBridges's Avatar
BobBridges BobBridges is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

Just in passing, this is really an Outlook programming question, not Excel. But I'm not complaining; I've posted questions about VBA/Outlook over at that forum and never gotten an answer; you're much more likely to get some useful response here.

I share your distaste for SendKeys, if for no other reason than that different users will have different options running. Doesn't matter whether you're all using the same version of Outlook; some users (including myself) always add the bcc box first thing when they are force-fed a new version of Outlook, others never do, so counting {Tab}s won't do it for you.

Placing the cursor within an HTML email body would normally be complicated by the fact that different users have different signatures, default fonts etc. But if you're going to define the entire body, allowing no variation in the HTML tags as well as the textual content, maybe that part won't be a problem. In that case, assuming every user will be using the Word email editor, you should be able to set the cursor position using a VBA/Word method or property. I haven't done it in long enough that I'd have to research it from scratch, but I have had to do it so I know it can be done. If you can figure it out from that minuscule hint, great; otherwise complain a little more and I'll see what I can dig up.
Reply With Quote