Does anyone know of a macro to convert selected artistic text frames to paragraph text frames?
I have a bunch of product sheets as PDFs that will eventually be maintain in CD. Ideally I would find a macro that would:
I would then manually delete all but the first paragraph text frame and resize it.
A bonus would be if the line spacing issue would also then be fixed. But I can live with highlighting and manually setting the line spacing. Important thing is that the macro would have the individual paragraph frames linked in the proper order.
Many thanks, Mike
might be a start. You'll have to select in the order you want and re-size the paragraph frame.
Sub ConvertArtTextToPara()
ActiveDocument.BeginCommandGroup "ConverArtTextToPara"
Dim s As Shape, sr As ShapeRange
Set sr = ActiveSelection.Shapes.FindShapes(, ArtisticText)
For Each s In sr
s.Text.ConvertToParagraph
Next s
sr.Combine
ActiveDocument.EndCommandGroup
End Sub
MikeWe said:So is there a way to set the line spacing on these combined artistic text frames that have been converted to paragraph text frames? What I would like to accomplish is to set the line spacing for all the paragraphs in the combined artistic text frames once combined.
You could try using Myron's code above, but adding a line to set the line spacing for each paragraph text item right after it has been converted to paragraph text, but before they have been combined.
Sub ConvertArtTextToPara() Dim s2 As Text ActiveDocument.BeginCommandGroup "ConverArtTextToPara" Dim s As Shape, sr As ShapeRange Set sr = ActiveSelection.Shapes.FindShapes(, ArtisticText) For Each s In sr s.Text.ConvertToParagraph s.Text.Story.SetLineSpacing cdrPercentOfPointSizeLineSpacing, 100, 200, 300 Next ssr.Combine ActiveDocument.EndCommandGroupEnd Sub
The one I've shown there uses percent of point size, and the 100, 200, 300 refer to line spacing, before paragraph spacing, and after paragraph spacing. Change those numbers to suit your needs, of course.
Here's a screenshot from the VBA editor to show options other than "percent of point size" that are available to set the spacing.