Results 1 to 2 of 2
2001-08-21, 09:35 #1
- Join Date
- Mar 2001
- St Georges du Bois, Pays de la Loire
- Thanked 0 Times in 0 Posts
MacroButton as hyperlink (Win95, Word 97, SR2)
I have been trying to make a macrobutton work as a hyperlink (on an intranet) to docs other than Word and have at succeeded. So for anyone who wants a hyperlink in a protected area here is the macro to call up in the button field:
ActiveDocument.FollowHyperlink Address:= _
"emm4000.pdf", NewWindow:=False _
Any URL you like between the " " - my example is a relative URL with everything in the same directory.
In a browser it opens in the same window but on a harddrive it will open the new application in a seperate window.
I know it looks obvious but it's a major triumph for me... Thanks to Charles Kenyon for tips.
2001-08-22, 21:42 #2
- Join Date
- Jan 2001
- Sun Prairie, Wisconsin, Wisconsin, USA
- Thanked 119 Times in 116 Posts
Re: MacroButton as hyperlink (Win95, Word 97, SR2)
You are welcome. One further tip is you can make it a single-click link rather than requiring a double-click by putting the following code into an AutoOpen macro in the linking document:
Options.ButtonFieldClicks = 1
(You can, instead, put the same code into the Document_Open event handler in This Document.)
To set the option back to the default, the language would be Options.ButtonFieldClicks = 2
I was tipped off to this by Bill Coan on the Word newsgroups.
I've put what little I know about macrobuttons in the <A target="_blank" HREF=http://www.addbalance.com/usersguide/fields.htm#MacroButton> draft</A> of a page I'm writing on fields.Charles Kyle Kenyon