Removing a hyperlink from a cell also removes formatting.
Selection.Hyperlinks.Delete
Is there a way to preserve the formatting, or do I need to reapply it after removing the hyperlink?
I found the solution was to call
Range.ClearHyperlinks
instead of
Range.Hyperlinks.Delete
the former clears the hyperlinks and leaves the formatting intact. Reference here: https://msdn.microsoft.com/en-us/library/office/ff194741.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With