Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-20-2025, 07:50 PM
Cendrinne's Avatar
Cendrinne Cendrinne is offline Question Regarding Splitting cells and Format Windows 10 Question Regarding Splitting cells and Format Office 2019
Competent Performer
Question Regarding Splitting cells and Format
 
Join Date: Aug 2019
Location: Montreal Quebec Canada
Posts: 200
Cendrinne is on a distinguished road
Default Ohhhhh I found a solution, not sure if it's the best but it works

Hello Pros and others reading this.

I've created a macro to search IF a cell is Bold.
If it is, then Remove Bold, then Put Back Bold.

HTML Code:
Sub All_Tables_FNR_IF_Bold_Tuggle_Bold_False_Bold_True()
Dim xTbl As Table
Dim aCel As cell
Dim oRng As Range
  
Application.ScreenUpdating = False

For Each xTbl In ActiveDocument.Range.Tables
  For Each aCel In xTbl.Range.Cells
     If aCel.Range.Font.Bold = True Then

'******** Good below
      
      aCel.Range.Font.Bold = False
      aCel.Range.Font.Bold = True
    End If
  Next aCel
Next
  Application.ScreenUpdating = True
  Application.ScreenRefresh
  DoEvents
  
lbl_Exit:
  Set xTbl = Nothing
  Set oRng = Nothing
  Exit Sub
  
  On Error GoTo 0
  
End Sub
Then if we split the cell, it keeps the bold format. Not sure for the rest, but I imagine doing this for the rest of the tables, before the split.

Maybe there is a other solution, but I'm no expert, but I've managed to find a solution to my problem
Reply With Quote
 

Tags
format cells, splitting cells



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question Regarding Splitting cells and Format Splitting Tables containing Merged Cells bpike Word VBA 7 10-28-2020 02:23 AM
Splitting paragraphs in cells into several cells mthwi Excel Programming 2 01-25-2018 05:27 PM
Question Regarding Splitting cells and Format Splitting Cells in a Very Large Table Paulvana Word 4 01-06-2017 01:52 PM
Question Regarding Splitting cells and Format Macro Needed to Insert Asnwer to A Question in Multiple Choice Format Question rsrasc Word VBA 7 03-28-2014 12:28 PM
Question Regarding Splitting cells and Format Preventing cells from splitting into two pages Jaymond Flurrie Word VBA 1 05-11-2011 06:54 PM

Other Forums: Access Forums

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