View Single Post
 
Old 12-10-2022, 04:58 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,163
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

It isn't immediately apparent how those three differ and you would probably need to ask an old MS engineer why there was once a need for .Address and .AddressOld. It appears that they all stay aligned but only one is editable via vba - both .AddressOld and .Name are read-only properties which change their values by changing .Address.
Code:
Sub aa()
  Dim aHL As Hyperlink
  Set aHL = ActiveDocument.Hyperlinks(1)
  aHL.Address = "Hi mum"
  Debug.Print aHL.AddressOld    'a read only property
  Debug.Print aHL.Name          'a read only property
End Sub
I am guessing but suspect the .Name property is relevant only saving the Word document to HTML. The Name attribute of an
HTML Code:
<a name="hello">
tag in HTML serves as an anchor (akin to a bookmark in Word) - see Anchor Tags and Name Attributes
By extension, I would hypothesize that .AddressOld comes into play when saving the Word file in a particular file format like RTF.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote