CDO Mail sending attachment via location field (1 Viewer)

mousemat

Completely Self Taught
Local time
Today, 22:08
Joined
Nov 25, 2002
Messages
233
So I have, now getting error 13 Type Mismatch

But when I have .Attachment.Add filename I get the error 438

Capture.PNG
 

cheekybuddha

AWF VIP
Local time
Today, 22:08
Joined
Jul 21, 2014
Messages
2,237
It's .AddAttachment rs.Fields("FormLocation")
 

Gasman

Enthusiastic Amateur
Local time
Today, 22:08
Joined
Sep 21, 2011
Messages
14,047
It's .AddAttachment rs.Fields("FormLocation")
The o/p assigned that field to filename after opening the recordset.
However cheekybuddha is correct with the method name

 

cheekybuddha

AWF VIP
Local time
Today, 22:08
Joined
Jul 21, 2014
Messages
2,237
Yes, but outside the loop.

So if there is more than one record, it will continue to attach the attachment from the first record
 

cheekybuddha

AWF VIP
Local time
Today, 22:08
Joined
Jul 21, 2014
Messages
2,237
The issue is the method.

In the failed attempt in Post#21 the OP was using a nonsense method.
 
Last edited:

Gasman

Enthusiastic Amateur
Local time
Today, 22:08
Joined
Sep 21, 2011
Messages
14,047
Yes, but outside the loop.

So if there is more than one record, it will continue to attach the attachment from the first record
The o/p actually had .AddAttachment in the original code? :(
 

mousemat

Completely Self Taught
Local time
Today, 22:08
Joined
Nov 25, 2002
Messages
233
Code:
.AddAttachment rs.Fields("FormLocation")

Worked perfectly. hanks fr all the help
 

Users who are viewing this thread

Top Bottom