Macro behind Link not working

L

LRay67

I am getting an error when applying a macro behind a hyperlink to a website.
I have other links to the same website and they are working. Not sure why
this one in particular is not working

Wording on the Word Document:
CMS - Bureau of Communication and Computer Services (BCCS) - Forms

Macro Code:
{MacroButton "FollowLink"{HYPERLINK :http://bccs.illinois.gov/forms_it.htm"}}

Error message when doing the ALT + F9 after code has been inserted:

DisplayText cannot span more than one line!

Any help is appreciated. Thanks

Linda
 
G

Graham Mayor

Why do you need a macrobutton field at all? Insert the Hyperlink into the
document.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Greg

I don't understand. I'm no expert, but the MacroButton field ref indicates
that the syntax for this field is

{ MACROBUTTON MacroName DisplayText }

For example:

{MACROBUTTON Speak {Author}} -- displays the author name and clicking on
that name runs the Speak macro.

but you have a string (macro name? display text?) followed by an embedded
hyperlink field. I assume that this embedded field, most likely returning
more than one line of text, is evaluated to produce DisplayText. So, the
error seems to make sense.

Is it possible that you have the order of arguments reversed?

But, then again, I can't get a macrobutton field to activate a hyperlink
field (that is, where the name of a macro is expected), so I'm puzzled. You
have a working example?

Just curious. I haven't used Word regularly in years.

Greg
 
L

LRay67

Graham, the hyperlink works only if the word document is not protected. Once
I protect the document the hyperlink doesn't work at all....

That is why I needed the macro behind it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top