Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-13-2022, 04:23 PM
macropod's Avatar
macropod macropod is offline Shrink to fit long merged name Windows 10 Shrink to fit long merged name Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You can indeed use the .FitText method in a post-merge macro, but restrict its application to cells in which text wrapping occurs. For example:
Code:
        With ActiveDocument.Tables(t).Cell(r, c).Range
            If .Characters.Last.Previous.Information(wdVerticalPositionRelativeToPage) <> _
              .Characters.First.Information(wdVerticalPositionRelativeToPage) Then
              .FitTextWidth = w
            End If
        End With
where:
• t is the table #


• r is the row #
• c is the column#
• w is the width in points
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 09-14-2022, 05:48 AM
Marcia's Avatar
Marcia Marcia is offline Shrink to fit long merged name Windows 11 Shrink to fit long merged name Office 2021
Expert
Shrink to fit long merged name
 
Join Date: May 2018
Location: Philippines
Posts: 553
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default

Thank you Paul.
But, I do not know how to input the row number, column number and column width in the code. The row number is 12, column number 2 and the column width is 2.38 inches. My vba "expertise" is to record repetitive tasks. But editing organic a code stump me.
Marcia
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shrink to fit long merged name How to unmerge all merged cell and fill them with the merged values? Bumba Excel Programming 1 11-10-2019 11:36 AM
Shrink to fit long merged name Why my Docm file does not shrink in size? eduzs Word VBA 3 09-16-2018 04:13 AM
Shrink to fit long merged name Does Word automatically shrink graphics? jrasicmark Drawing and Graphics 1 05-06-2014 04:38 PM
Custom Animation: Faded Shrink? Dingeling PowerPoint 2 12-14-2011 02:14 AM
Possible to shrink .DOC file? uoficowboy Word 0 06-09-2010 10:13 AM

Other Forums: Access Forums

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