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
Why do you need a macrobutton field at all? Insert the Hyperlink into the document. -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>><<> LRay67 wrote: > 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
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 "LRay67" wrote: > 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
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. "Graham Mayor" wrote: > Why do you need a macrobutton field at all? Insert the Hyperlink into the > document. > > -- > <>>< ><<> ><<> <>>< ><<> <>>< <>><<> > Graham Mayor - Word MVP > > My web site www.gmayor.com > Word MVP web site http://word.mvps.org > <>>< ><<> ><<> <>>< ><<> <>>< <>><<> > > > LRay67 wrote: > > 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 > > >