|
-
Jan 10th, 2001, 03:04 AM
#1
Thread Starter
New Member
how do I attach a file to the email.
I am using the CDO libary,
I dimmed the following:
dim objSession as MAPI.Session
dim objMessage as MAPI.Message
Create the Session:
Set objSession = CreateObject("Mapi.Session")
log onto session:
objSession.Logon SETTINGS
strUserName = objSession.CurrentUser
created the message and fill in its properties:
Set objMessage = objSession.Outbox.Messages.Add
objMessage.Subject = txtSubject.Text
objMessage.Text = txtMessage.Text
objMessage.Attachments.Add ??????
I don't know how assign and load the file I want into the message.
-
Jan 10th, 2001, 03:23 AM
#2
Addicted Member
just a suggestion
I've messed with CDO before and I found that for MAPI stuff it's hard to beat, but if you're looking to do SMTP/POP3; I would download AspEmail (http://www.persits.com/aspemail.exe) because it's free (I think) and distributable as one .DLL and it does everything (including attachments) really easily.
-
Jan 10th, 2001, 04:01 AM
#3
Thread Starter
New Member
???
the app uses the users outlook or ms exhange setting,
all I need to do is assign the attachment to the file but she won't work.
-
Jan 10th, 2001, 04:52 AM
#4
Lively Member
Outlook object lib
If the all the users have outlook why not swap to using the outlook object library? You can then use the Attachment object of the MailItem.
I can't help with the MAPI stuff (got some examples but not got round to looking at them!), we needed something like yesterday and the outlook lib was quickest way to get a solution.
Anakim
It's a small world but I wouldn't like to paint it.
-
May 11th, 2001, 08:19 AM
#5
This is how I did it.
'''''''''''''''''''''''
Dim AttachmentFile As String
MAPIMessages1.SessionID = MAPISession1.SessionID
With MAPIMessages1
AttachmentFile="C:\Test\Test.txt"
.AttachmentPathName = AttachmentFile
End With
'''''''''''''''''''''''''
Hope, it'll help.
-
May 16th, 2001, 06:01 AM
#6
Lively Member
Hi there,
i had a problem with attachments too. after day´s of searching i found out that you need for every attachment a character in the messagebody.
wolf
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|