J
John
Hi there,
I have a block of code that runs through each paragraph in a slide and
replaces dash variants to a standard dash (Chr(45)). This works fine apart
from the fact that it deletes any hyperlinks (external) in the paragraph as
well.
Can anyone tell me a) why this is happening and b) what the solution might
be?
Many thanks
John
For Each txtPara In shp.TextFrame.TextRange.Paragraphs
'Replace en & em dashes with normal dashes
' Note em dash = Chr(151)
' and en dash = Chr(150)
' and normal dash = Chr(45)
txtPara = Replace(txtPara, " " & Chr(150) & " ", " "
& Chr(45) & " ")
txtPara = Replace(txtPara, " " & Chr(151) & " ", " "
& Chr(45) & " ")
Next txtPara
I have a block of code that runs through each paragraph in a slide and
replaces dash variants to a standard dash (Chr(45)). This works fine apart
from the fact that it deletes any hyperlinks (external) in the paragraph as
well.
Can anyone tell me a) why this is happening and b) what the solution might
be?
Many thanks
John
For Each txtPara In shp.TextFrame.TextRange.Paragraphs
'Replace en & em dashes with normal dashes
' Note em dash = Chr(151)
' and en dash = Chr(150)
' and normal dash = Chr(45)
txtPara = Replace(txtPara, " " & Chr(150) & " ", " "
& Chr(45) & " ")
txtPara = Replace(txtPara, " " & Chr(151) & " ", " "
& Chr(45) & " ")
Next txtPara