-
Sending emails...jFound the problem I was having getting it to work on NT
Code:
'this works
With objOutlookMsg
.To = Rst!email
.Subject = mySubject
.Body = "To All Parties Concerned:" & vbNewLine & vbNewLine
.Importance = olImportanceHigh
.Send
'***.what code adds an attachment in the form of a file.***
End With
What I require is the line of code or other to add an
attachment to the email. Anyone have this handy.
-
Here you go
Hope you'll find whatu looking for??
-
<?>
Thanks, I will check it out but from it's description it uses winsock and I am using Outlook Object. Outlook has it's own file attachements button, so there has to he a way to access the code from within the object.
-
Maybe you'll find something here
I did'nt have the time to read it, but they talk about
attachement in the item collection.
Hope it helps
-
...
'this works
With objOutlookMsg
.To = Rst!email
.Subject = mySubject
.Body = "To All Parties Concerned:" & vbNewLine & vbNewLine
.Importance = olImportanceHigh
.Send
'***.what code adds an attachment in the form of a file.***
.Attachments tpath 'where tpath is the full path of the file
End With
Try that... (May be)
-
<?>
Thanks all..here is the scoop.
Code:
'declare the attach object
Dim objOutlookAttach as Object
'declare the string for the attachement
Dim strAttach as string
strAttach = "C:\mytext.txt"
With objOutlookMsg
.To = Rst!email
.Subject = mySubject
.Body = "To All Parties Concerned:" & vbNewLine & vbNewLine
.Importance = olImportanceHigh
'****** set the attachments *******
Set objOutlookAttach = .Attachments.Add(strAttachments)
.Send
End With