# Visual Basic > Office Development >  Simple macro in Outlook to remove spacing: Object required error message

## CoderDad

I created a macro to remove spacing successfully in Word and it looks like this:
Selection.Style = ActiveDocument.Styles("No Spacing") -- with the appropriate Sub and End Sub.

When I created a macro in Outlook and typed in the same content, it did not work.
Error message was:
Run-time error '424':
Object required

What did I do wrong?

I am obviously a VBA newbie. I want to select text in an email and use a macro to remove spacing -- without having to right-click to access paragraph settings or open the email and go to Format Text.

Thank you.

----------


## jdc2000

Possibly useful links:

https://stackoverflow.com/questions/...ter-in-outlook

https://www.appsloveworld.com/vba/10...ter-in-outlook

https://chandoo.org/forum/threads/ho...ml-code.33909/

----------

