Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component


Index of Chilkat Blog Posts

November 12, 2007

ASP: The object does not support this property or method

If you get the "The object does not support this property or method" in ASP (or VB6), it could mean you’ve misspelled a method or property name, but it could also mean that you’re trying to use a method as a property. For example:

    set oEmail = server.CreateObject(⪯Chilkat.WebEmail2⪯)
    oEmail.SetHtmlBody = txt

This is incorrect because SetHtmlBody is a method, not a property.
In this case, SetHtmlBody does not return a success/failure status (it does not return anything), therefore it is a subroutine and not a function. To call a subroutine in ASP, you pass the parameters w/out parentheses (the parentheses are optional). So… the solution is to remove the "=":

    set oEmail = server.CreateObject(⪯Chilkat.WebEmail2⪯)
    oEmail.SetHtmlBody txt


Privacy Statement. Copyright 2000-2011 Chilkat Software, Inc. All rights reserved.
Send feedback to support@chilkatsoft.com

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, Windows 7, and Windows 95/98/NT4.