VB to hyperlink a filename & path

  CliffP 15:07 10 Jan 03
Locked
  CliffP 15:07 10 Jan 03

I need a Word 2000 macro that will insert a documents filename and path AND hyperlink it, so that I can right click, copy and paste the link into an email. Any takers ? TIA

  CliffP 16:28 10 Jan 03

any takers?

  VoG™ 17:00 10 Jan 03

This is Word 2002, should work in 2000

Sub Macro4()

Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"FILENAME \p ", PreserveFormatting:=True

Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend

ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:= _
ActiveDocument, SubAddress:=""

End Sub

  CliffP 17:11 10 Jan 03

Many thanks - I'll try that and let you know ...

  CliffP 13:28 14 Jan 03

It works fine - I owe you one. Many thanks

This thread is now locked and can not be replied to.

What is Google Allo? What is Google Duo? Google Allo UK release date and features: Google Allo is…

1995-2015: How technology has changed the world in 20 years

iOS 10 troubleshooting tips: Simple fixes for the most common iOS 10 problems, from network…