Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 08-11-2016, 03:28 PM
gmaxey gmaxey is offline table and code accidentally working only on odd rows Windows 7 32bit table and code accidentally working only on odd rows Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Other than selecting text, your posted code isn't doing anything with the text in a table paragraph.

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oPar As Paragraph
Dim oRng As Range
Dim dblSize As Double
  For Each oPar In ActiveDocument.Paragraphs
  Set oRng = oPar.Range
  With oRng
    .MoveEnd wdCharacter, -1
    While .Information(wdFirstCharacterLineNumber) <> .Characters.Last.Information(wdFirstCharacterLineNumber)
      dblSize = .Font.Size
      oRng.Font.Size = dblSize - 0.5
      If .Information(wdFirstCharacterLineNumber) <> .Characters(Len(.Text)).Information(wdFirstCharacterLineNumber) Then
        If oRng.Font.Spacing > -0.3 Then oRng.Font.Spacing = oRng.Font.Spacing - 0.05
        If .Information(wdFirstCharacterLineNumber) <> .Characters(Len(.Text)).Information(wdFirstCharacterLineNumber) Then
          If oRng.Font.Spacing > -0.3 Then oRng.Font.Spacing = oRng.Font.Spacing - 0.05
        End If
      End If
    Wend
  End With
  Next oPar
lbl_Exit:
  Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
table and code accidentally working only on odd rows I want to add multiple rows into my document but I can not figure out the code jlw15931 Mail Merge 1 02-24-2015 05:03 AM
table and code accidentally working only on odd rows Header Rows in Tables Not Working Andy Pilkington Word 2 10-10-2014 12:36 AM
table and code accidentally working only on odd rows Is it possible to copy non-contiguous rows of a Table and paste them as a separate Table in Word? Joey Cheung Word Tables 1 08-12-2014 05:15 PM
table and code accidentally working only on odd rows VBA Code to take data from a table in word document and place it in a summary table VBLearner Word VBA 1 03-09-2014 08:42 PM
table and code accidentally working only on odd rows Grouping table rows to prevent individual rows from breaking across pages dennist77 Word 1 10-29-2013 11:39 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:04 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