Microsoft Outlook Macro

sophist

New Member
Joined
Jun 12, 2014
Messages
1
Hi All,

Apologies for the basic newbie question but I'm trying to streamline things and have found how to add a button which will spit some text into an email for me.

So far it is this:

Sub test()
Set objDoc = Application.ActiveInspector.WordEditor
Set objSel = objDoc.Windows(1).Selection
objSel.TypeText Text:="Pre written text has been inserted"
End Sub

That works great, but I'm then trying to format the text and having some problems. I'm not trying to highlight anything, change fonts or sizes etc. I just really want to be able to have a space and perhaps some bullet points (which could just be a *). Essentially I'm trying to do something like this;

"Dear XXX,

Thanks for selecting our service, to get the process started we need the following;

* Your full name
* Some other things

Thanks and have a smashing day"

Any help with how to set this up inside a macro would be super. I understand I could pre format something in Word, and have the maco copy it and paste it into an email as long as it's in the correct directory etc. This might even be a better option for me in the long term.

Cheers!

Sophist
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,225,681
Messages
6,186,411
Members
453,352
Latest member
OrionF

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top