J
John
Hi there,
I had a bit of code that I've used in PowerPoint to loop through each
paragraph in a textbox so that I could then extract the first sentence (ie
up to the first dash). Works fine, but trying to do the same thing in
Publisher, I discovered that "Paragraph" isn't an object of Textrange (as it
is in PowerPoint) so I'm having trouble getting hold of each paragraph.
This is the code from PowerPoint:
For Each txtPara In shp.TextFrame.TextRange.Paragraphs
and this is my (not quite working!) attempt in Publisher:
n = 1
Do Until shp.TextFrame.TextRange.Paragraphs(Start:=n) Is Nothing
strDelimiter = " " & Chr(45) & " "
arrHd = Split(shp.TextFrame.TextRange.Paragraphs(Start:=n).Text,
strDelimiter)
hdrsCol.Add (strHd)
n = n + 1
Loop
Can anyone suggest a good way to approach this?
Thanks
John
I had a bit of code that I've used in PowerPoint to loop through each
paragraph in a textbox so that I could then extract the first sentence (ie
up to the first dash). Works fine, but trying to do the same thing in
Publisher, I discovered that "Paragraph" isn't an object of Textrange (as it
is in PowerPoint) so I'm having trouble getting hold of each paragraph.
This is the code from PowerPoint:
For Each txtPara In shp.TextFrame.TextRange.Paragraphs
and this is my (not quite working!) attempt in Publisher:
n = 1
Do Until shp.TextFrame.TextRange.Paragraphs(Start:=n) Is Nothing
strDelimiter = " " & Chr(45) & " "
arrHd = Split(shp.TextFrame.TextRange.Paragraphs(Start:=n).Text,
strDelimiter)
hdrsCol.Add (strHd)
n = n + 1
Loop
Can anyone suggest a good way to approach this?
Thanks
John