Click here to Skip to main content
15,891,904 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Access VBA Timing Problem Pin
Dave Kreskowiak19-Mar-13 8:09
mveDave Kreskowiak19-Mar-13 8:09 
AnswerRe: Access VBA Timing Problem Pin
Maciej Los19-Mar-13 6:54
mveMaciej Los19-Mar-13 6:54 
GeneralRe: Access VBA Timing Problem Pin
Ingo19-Mar-13 7:15
Ingo19-Mar-13 7:15 
AnswerRe: Access VBA Timing Problem Pin
Bernhard Hiller19-Mar-13 23:18
Bernhard Hiller19-Mar-13 23:18 
GeneralRe: Access VBA Timing Problem Pin
Ingo20-Mar-13 0:01
Ingo20-Mar-13 0:01 
Questionusing vb to create a custom email attachment Pin
Member 986550818-Mar-13 10:44
Member 986550818-Mar-13 10:44 
AnswerRe: using vb to create a custom email attachment Pin
Eddy Vluggen18-Mar-13 10:57
professionalEddy Vluggen18-Mar-13 10:57 
GeneralRe: using vb to create a custom email attachment Pin
Member 986550818-Mar-13 13:57
Member 986550818-Mar-13 13:57 
what i'm trying to do is send emails from vb that have a custom attachment based on the fields in an access database each email is sent to a different person and the attachment will be different for each person, the code i'm using so far is

Set cdomsg = CreateObject("CDO.message")
With cdomsg.Configuration.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = 465
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "xxx"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "xxx"

.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1


.Update
End With

If Not (r.EOF And r.BOF) Then
r.MoveFirst
Do Until r.EOF = True
email = r.Fields("EmailAddress")
name = r.Fields("Firstname")
With cdomsg

.To = email
.FROM = "I@dontThinkThisIsUsed.com"
.Subject = "Test email " + name
.TextBody = "message"
.Addattachment "attachment loaction.docx"
.Send

End With

r.MoveNext

Loop

hope this helps thanks

I can send the emails but not the custom attachments
AnswerRe: using vb to create a custom email attachment Pin
Eddy Vluggen19-Mar-13 1:27
professionalEddy Vluggen19-Mar-13 1:27 
GeneralRe: using vb to create a custom email attachment Pin
Member 986550819-Mar-13 4:32
Member 986550819-Mar-13 4:32 
GeneralRe: using vb to create a custom email attachment Pin
Eddy Vluggen19-Mar-13 10:14
professionalEddy Vluggen19-Mar-13 10:14 
QuestionCalculate date between two date? Pin
Akbarblack18-Mar-13 4:31
Akbarblack18-Mar-13 4:31 
QuestionRe: Calculate date between two date? Pin
GuyThiebaut18-Mar-13 5:24
professionalGuyThiebaut18-Mar-13 5:24 
AnswerRe: Calculate date between two date? Pin
dusty_dex18-Mar-13 5:24
dusty_dex18-Mar-13 5:24 
AnswerRe: Calculate date between two date? Pin
Bert Mitton18-Mar-13 5:38
professionalBert Mitton18-Mar-13 5:38 
GeneralRe: Calculate date between two date? Pin
Akbarblack23-Mar-13 6:42
Akbarblack23-Mar-13 6:42 
QuestionStoring booleans in a byte Pin
Jörgen Andersson14-Mar-13 2:30
professionalJörgen Andersson14-Mar-13 2:30 
AnswerRe: Storing booleans in a byte Pin
Peter_in_278014-Mar-13 11:39
professionalPeter_in_278014-Mar-13 11:39 
GeneralRe: Storing booleans in a byte Pin
Jörgen Andersson14-Mar-13 12:30
professionalJörgen Andersson14-Mar-13 12:30 
Questiondirect x Pin
Member 989693213-Mar-13 21:21
Member 989693213-Mar-13 21:21 
AnswerRe: direct x Pin
Richard MacCutchan13-Mar-13 22:46
mveRichard MacCutchan13-Mar-13 22:46 
GeneralRe: direct x Pin
Blikkies14-Mar-13 0:30
professionalBlikkies14-Mar-13 0:30 
GeneralRe: direct x Pin
Richard MacCutchan14-Mar-13 0:35
mveRichard MacCutchan14-Mar-13 0:35 
GeneralRe: direct x Pin
Dave Kreskowiak14-Mar-13 1:31
mveDave Kreskowiak14-Mar-13 1:31 
QuestionMultiple Column combobox and list box Pin
JohnGreen459513-Mar-13 6:26
JohnGreen459513-Mar-13 6:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.