From: Sharkbyte on 26 Apr 2010 12:21 I have setup email, using CDO, in a database. I have incorporated www.lebans.com's code for creating a PDF. However, when I configure my CDO.Message object, I get an "Object doesn't support this property or method. Error Number 438" Here is the offending code. It is the .AddAttachment property. With iMsg .To = gblEmail1 .From = gblEmailFrom .BCC = gblEmailBCC .Subject = gblEmailSubject .Sender = gblEmailReply .ReplyTo = gblEmailReply .HTMLBody = gblEmailBody .AddAttachment = "c:\tsw\" & gblReportName Can anyone offer a suggestion on the correct property name? I can't track it down. Thanks. Sharkbyte
From: Hans Up on 26 Apr 2010 12:44 Sharkbyte wrote: > I have setup email, using CDO, in a database. I have incorporated > www.lebans.com's code for creating a PDF. > > However, when I configure my CDO.Message object, I get an > > "Object doesn't support this property or method. Error Number 438" > > Here is the offending code. It is the .AddAttachment property. > > With iMsg > .To = gblEmail1 > .From = gblEmailFrom > .BCC = gblEmailBCC > .Subject = gblEmailSubject > .Sender = gblEmailReply > .ReplyTo = gblEmailReply > .HTMLBody = gblEmailBody > .AddAttachment = "c:\tsw\" & gblReportName I haven't tried this myself, but it looks to me like AddAttachment is a method rather than a property. You can't assign a value (as in .method = value) to property. Try it like this: ..AddAttachment ("c:\tsw\" & gblReportName)
From: Hans Up on 26 Apr 2010 12:50 Hans Up wrote: > I haven't tried this myself, but it looks to me like AddAttachment is a > method rather than a property. You can't assign a value (as in .method > = value) to property. Try it like this: > > .AddAttachment ("c:\tsw\" & gblReportName) I meant to say "to a method" instead of "to property". And I don't if the parentheses would be required. So maybe try it this way, too: ..AddAttachment (\"c:\tsw\" & gblReportName
From: Dorian on 26 Apr 2010 12:55 Why dont you look in the Object Browser. It will list all the properties and methods for each object. Click F2 from any code window and select your CDO library. -- Dorian "Give someone a fish and they eat for a day; teach someone to fish and they eat for a lifetime". "Sharkbyte" wrote: > I have setup email, using CDO, in a database. I have incorporated > www.lebans.com's code for creating a PDF. > > However, when I configure my CDO.Message object, I get an > > "Object doesn't support this property or method. Error Number 438" > > Here is the offending code. It is the .AddAttachment property. > > With iMsg > .To = gblEmail1 > .From = gblEmailFrom > .BCC = gblEmailBCC > .Subject = gblEmailSubject > .Sender = gblEmailReply > .ReplyTo = gblEmailReply > .HTMLBody = gblEmailBody > .AddAttachment = "c:\tsw\" & gblReportName > > > Can anyone offer a suggestion on the correct property name? I can't track > it down. > > Thanks. > > Sharkbyte
From: Sharkbyte on 26 Apr 2010 13:39 Dorian: I tried but do not find the Object... "Dorian" wrote: > Why dont you look in the Object Browser. It will list all the properties and > methods for each object. > Click F2 from any code window and select your CDO library. > -- Dorian > "Give someone a fish and they eat for a day; teach someone to fish and they > eat for a lifetime". > > > "Sharkbyte" wrote: > > > I have setup email, using CDO, in a database. I have incorporated > > www.lebans.com's code for creating a PDF. > > > > However, when I configure my CDO.Message object, I get an > > > > "Object doesn't support this property or method. Error Number 438" > > > > Here is the offending code. It is the .AddAttachment property. > > > > With iMsg > > .To = gblEmail1 > > .From = gblEmailFrom > > .BCC = gblEmailBCC > > .Subject = gblEmailSubject > > .Sender = gblEmailReply > > .ReplyTo = gblEmailReply > > .HTMLBody = gblEmailBody > > .AddAttachment = "c:\tsw\" & gblReportName > > > > > > Can anyone offer a suggestion on the correct property name? I can't track > > it down. > > > > Thanks. > > > > Sharkbyte
|
Next
|
Last
Pages: 1 2 Prev: Trouble with “… attempting to change the same data at the same tim Next: xx |