I usually save to notepad or Access, but Tweets require Word to see gray hyperlinks, which must be separately selected between double quotes from within Hyperlink tag.
(Not a Programmer nor write code.)
Instead of extracting only links in wrong order to a new doc ..
Below code (I changed) extracts/inserts link before gray hyperlink, inplace within tweet, within current document. (Inserting after gray hyperlink makes extracted link gray also).
Question:
It's 99% there, but how to also extract date and time along with status url?
{HYPERLINK " \o "7:27 AM - 26 Nov 2019" }
Tweet message.
Word macro code:
Sub HlinkChanger()
Dim oRange As Word.Range
Dim oField As Field
Dim link As Variant
With ActiveDocument
' .Range.AutoFormat '(orig) I commented out
For Each oRange In .StoryRanges
For Each oFld In oRange.Fields
If oFld.Type = wdFieldHyperlink Then
For Each link In oFld.Result.Hyperlinks
oFld.Select
Selection.InsertBefore (" (" + link.Address + ") ") '(orig) InsertAfter
'Selection.InsertBefore (" (" + link.Address & " " & link.SubAddress + ") ")
Next link
End If
Next oFld
Set oRange = oRange.NextStoryRange
Next oRange
End With
End Sub
(Not a Programmer nor write code.)
Instead of extracting only links in wrong order to a new doc ..
Below code (I changed) extracts/inserts link before gray hyperlink, inplace within tweet, within current document. (Inserting after gray hyperlink makes extracted link gray also).
Question:
It's 99% there, but how to also extract date and time along with status url?
{HYPERLINK " \o "7:27 AM - 26 Nov 2019" }
Tweet message.
Word macro code:
Sub HlinkChanger()
Dim oRange As Word.Range
Dim oField As Field
Dim link As Variant
With ActiveDocument
' .Range.AutoFormat '(orig) I commented out
For Each oRange In .StoryRanges
For Each oFld In oRange.Fields
If oFld.Type = wdFieldHyperlink Then
For Each link In oFld.Result.Hyperlinks
oFld.Select
Selection.InsertBefore (" (" + link.Address + ") ") '(orig) InsertAfter
'Selection.InsertBefore (" (" + link.Address & " " & link.SubAddress + ") ")
Next link
End If
Next oFld
Set oRange = oRange.NextStoryRange
Next oRange
End With
End Sub