This article was previously published under Q161324
This article has been archived. It is offered "as is" and will no longer be updated.
When you run a Visual Basic for Applications macro in Microsoft Excel 97,you may receive one of the following error messages:
Run-time error '-2146697203 (800c000d)': Method 'FollowHyperlink' of object '_Workbook' failed
Run-time error '-2146697203 (800c000d)': The required Internet protocol is not installed on your computer, or the Internet address you requested may not be valid.
and the macro halts.
This problem occurs when all of the following conditions are true:
The macro contains a line of code that executes the FollowHyperlink method. -and-
The Address argument of the Hyperlink method refers to an electronic mail (e-mail) address by using "mailto:" (without the quotation marks) followed by the address. For example, you use the following code:
You set the ExtraInfo argument of the Hyperlink method to any value. For example, you use the code:
ExtraInfo:="Here's some extra info."
You set the Method argument of the Hyperlink method to the value "msoMethodPost" (without the quotation marks). For example, you use the following command:
To resolve this problem, do not set the value of the Method argument to"msoMethodPost" when the Address argument contains a "mailto:" reference.
Microsoft has confirmed this to be a problem in the Microsoft productslisted at the beginning of this article. This problem no longer occurs in Microsoft Excel 2000.
In Microsoft Excel 97, you can use the FollowHyperlink method in a VisualBasic macro when you want to view a document or Web page located either onthe Internet or on your local intranet. The Address argument of theFollowHyperlink method allows you to specify what document to view. Forexample, the following code:
However, if the Address argument begins with "mailto:" followed by ane-mail address, Microsoft Excel 97 starts your mail client (for example,Microsoft Outlook 97, or Microsoft Exchange) and instructs your mail clientto compose a new mail message that is addressed to the specified e-mailaddress. For example, running this line of code:
causes your mail client to compose a new mail message that is addressed firstname.lastname@example.org. Note that the new mail message is not sentautomatically. You must still click Send to send the message.
If the Address argument refers to an e-mail address, setting the Methodargument to msoMethodPost causes one of the error messages described inthis article to appear, and the macro halts. For example, the followingline of code does not work:
ActiveWorkbook.FollowHyperlink Address:="mailto:email@example.com", _ ExtraInfo:="Here's the data!", Method:=msoMethodPost