Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-14-2014, 07:03 AM
Catty Catty is offline Macro to change paragraph linespacing to 1.3 in outlook 2010 Windows 7 32bit Macro to change paragraph linespacing to 1.3 in outlook 2010 Office 2010 32bit
Advanced Beginner
Macro to change paragraph linespacing to 1.3 in outlook 2010
 
Join Date: Nov 2013
Posts: 39
Catty is on a distinguished road
Default Macro to change paragraph linespacing to 1.3 in outlook 2010

Hi,



I'm trying to create a macro in outlook that will change the paragraph line spacing (and font name and size of text if possible). Below is the code I've been playing around with, but it's not working 100% and/or it fails @ this line of code "Paragraph.LineSpacing = LinesToPoints(1.3)".

Don't know what I'm doing wrong. Any help would be much appreciated.

Code:
Sub LineSpacing()


    Dim objOL As Outlook.Application
    Dim sel As Object

    Set objOL = Outlook.Application
    Set sel = objOL.ActiveInspector().WordEditor.Application.Selection

    For Each Paragraph In sel.Paragraphs
        Paragraph.LineSpacingRule = wdLineSpaceMultiple
        Paragraph.LineSpacing = LinesToPoints(1.3)
        
    Next

End Sub
Reply With Quote
  #2  
Old 02-14-2014, 10:49 PM
Dexter_morgan 158 Dexter_morgan 158 is offline Macro to change paragraph linespacing to 1.3 in outlook 2010 Windows 7 32bit Macro to change paragraph linespacing to 1.3 in outlook 2010 Office 2010 32bit
Novice
 
Join Date: Feb 2014
Posts: 11
Dexter_morgan 158 is on a distinguished road
Default Macro to change paragraph linespacing to 1.3 in outlook 2010

Hi Catty ,
Well i surfed the net for the solution to your problem , then tried the following code and it worked. I hope it works for you as well.

Sub LineSpacing()
With Selection.ParagraphFormat
.LineSpacingRule = wdLineSpaceExactly
.LineSpacing = 1.3 * Selection.Characters(1).Font.Size
End With
End Sub

Please revert back if it works.
Thanks
~Dex
Reply With Quote
  #3  
Old 02-27-2014, 01:14 AM
Catty Catty is offline Macro to change paragraph linespacing to 1.3 in outlook 2010 Windows 7 32bit Macro to change paragraph linespacing to 1.3 in outlook 2010 Office 2010 32bit
Advanced Beginner
Macro to change paragraph linespacing to 1.3 in outlook 2010
 
Join Date: Nov 2013
Posts: 39
Catty is on a distinguished road
Default

Hi Dexter,

Thanks for your response. I have tried the macro and unfortunately its not working for me, instead I get a "Run-time error '429'. ActiveX component can't create object.

I researched how the above error could be resolved but alas, everything I've tried so far hasn't worked.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help on Outlook 2010 Macro rainpuppy Outlook 4 02-04-2013 12:44 AM
Word 2010 will not let me change alignment on specific paragraph garrisonsdad Word 6 12-19-2012 09:23 PM
Macro help outlook 2010 seanchad Outlook 0 06-28-2012 02:49 AM
Don't indent the fist line of the first paragraph after a style change Inspirement Word 1 04-08-2012 05:30 AM
Macro to change paragraph linespacing to 1.3 in outlook 2010 Outlook 2010 - Change default data file. siouxnami Outlook 4 01-26-2012 12:24 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:13 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft