Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 03-09-2023, 11:51 PM
laith93 laith93 is offline Convert Text Boxes to Normal Text in Word Using VBA Code Windows 10 Convert Text Boxes to Normal Text in Word Using VBA Code Office 2019
Competent Performer
Convert Text Boxes to Normal Text in Word Using VBA Code
 
Join Date: Jul 2021
Posts: 117
laith93 is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
The basic principle is as follows
Code:
Sub FlattenTextBoxes()
  Dim shp As Shape, iShp As Integer, sString As String
  For iShp = ActiveDocument.Shapes.Count To 1 Step -1
    Set shp = ActiveDocument.Shapes(iShp)
    If shp.TextFrame.HasText Then
      sString = shp.TextFrame.TextRange.Text
      shp.Anchor.InsertBefore sString
      shp.Delete
    End If
  Next iShp
End Sub
Dear Andrew,
Thanks so much for this great help
The basic reason for this appearance is when I convert a PowerPoint file (in pdf format downloaded from the net) to ppt again, every line is converted to a textbox, after running your macro, it flattened all the textboxes to standard plain text.
Now everything is ok, although it requires returning each line to its corresponding paragraph.

However, Thanks again with my respect, you helped me and saved my time.
Best Wishes
Reply With Quote
 

Tags
vba, word vba, word vba code



Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert Text Boxes to Normal Text in Word Using VBA Code Convert all equations to "Normal Text" b0x4it Word VBA 16 02-14-2023 03:52 AM
Convert Text Boxes to Normal Text in Word Using VBA Code Creating and Referencing Drop Down Text Boxes in VBA code cjkmarx Word VBA 1 12-12-2016 03:20 PM
Convert Text Boxes to Normal Text in Word Using VBA Code Word 2013 Text boxes on everything, can't select across multiple boxes 1Kurgan1 Word 2 10-31-2016 01:20 AM
Convert Text Boxes to Normal Text in Word Using VBA Code Drawing lines between text boxes which have actual text within the text boxes RHODIUM Word 6 10-01-2016 04:43 PM
Converting normal text boxes into placeholders? thousandred PowerPoint 0 12-08-2010 09:59 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:35 PM.


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