Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 12-10-2022, 04:58 PM
Guessed's Avatar
Guessed Guessed is offline Difference between Address and Name in a Hyperlink Field? Windows 10 Difference between Address and Name in a Hyperlink Field? Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
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
 

Tags
field code hyperlink



Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between Address and Name in a Hyperlink Field? can you batch edit hyperlink address syntax? Dane Cole Word 3 02-19-2019 02:49 PM
Difference between Address and Name in a Hyperlink Field? How to extract selected hyperlink address to clipboard? poetofpiano Word VBA 8 02-18-2018 07:17 PM
Hyperlink formula returning 'invalid site address' MarkH Excel 0 12-26-2015 10:43 AM
Cant unformat email address hyperlink in Excel the way HELP says I can tomseeley Excel 11 01-24-2014 05:50 PM
Hyperlink address fields from Excel BongoBill Word 0 04-13-2010 04:27 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:39 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft