CDO Mail sending attachment via location field (1 Viewer)

mousemat

Completely Self Taught
Local time
Today, 07:39
Joined
Nov 25, 2002
Messages
229
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, 07:39
Joined
Jul 21, 2014
Messages
557
It's .AddAttachment rs.Fields("FormLocation")
 

Gasman

Enthusiastic Amateur
Local time
Today, 07:39
Joined
Sep 21, 2011
Messages
7,114
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, 07:39
Joined
Jul 21, 2014
Messages
557
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, 07:39
Joined
Jul 21, 2014
Messages
557
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, 07:39
Joined
Sep 21, 2011
Messages
7,114
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, 07:39
Joined
Nov 25, 2002
Messages
229
Code:
.AddAttachment rs.Fields("FormLocation")

Worked perfectly. hanks fr all the help
 

Users who are viewing this thread

Top Bottom