WD2000: Run-Time Error 4198 with VBA Hyperlinks Object

Article translations Article translations
Article ID: 228701 - View products that this article applies to.
This article was previously published under Q228701
Expand all | Collapse all

SYMPTOMS

If you use the Visual Basic for Applications Hyperlinks object, and an AutoShape object is selected, you receive the following error message:
Run-time error '4198':

Command Failed
For example, the following macro code causes this error message to appear when your Word document contains a hyperlink, and a floating object is selected:
MsgBox ActiveDocument.Hyperlinks(1).Name
				
All of the properties of the Hyperlinks object cause the same error message to appear.

RESOLUTION

Make sure that no AutoShapes, pictures, or other objects with a wrapping style other than In-line with text are selected before you use the Hyperlinks object in your macro code.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

Properties

Article ID: 228701 - Last Review: October 11, 2006 - Revision: 3.2
APPLIES TO
  • Microsoft Word 2000 Standard Edition
Keywords: 
kbbug kbnofix KB228701

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com