View Single Post
 
Old 01-21-2023, 08:09 PM
AlanCantor AlanCantor is offline Windows 10 Office 2019
Competent Performer
 
Join Date: Nov 2020
Posts: 154
AlanCantor is on a distinguished road
Default Remove hypertext from clipboard

I'm using a script that copies the content of a table in a Word document:

Code:
Selection.Tables(1).Range.Copy
The script has been working beautifully... until I stumbled on a problem: a subsequent step in the macro fails if a cell in the table contains hypertext (e.g., a clickable email or web address).

This problem would evaporate if I could strip away the hypertext from the selection, or from the clipboard after the text is copied.

Any thoughts on how my macro might eliminate hypertext? Example: if xxx@yyy.zzz is a clickable link in the table, I want the text of the email address, but without it being a hypertext.

I'd be good if the macro stripped away hypertext from the table before copying the table. But my preference would be for the change to happen in Variable-Land.
Reply With Quote