Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Send Mail From VB6 Attaching Word Document Into Email


I have a form with a text field that has a path to a word document.

I would like to send this document to some email recipients but not as an attachment but in the body of the email.

I know how to attach a document to the email but to make it display in the body I can't.

Any help would be highly appreciated.

Thanks
Karol


 




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
A Button To Convert A Word Document To PDF And Send It By Email --with VB6
Hi there,

I want to add a button to Word to convert the current document to PDF and send it by email to a list of emails I have on an XML file on a remote server.

Is this possible with VB6?

If it is, can you give me some examples/articles on...
1. How to create/add the button itself
2. How to convert the current document to PDF
3. How to read a remote XML file
4. How to send emails

Thank you!!

Attaching A Html Document To The Body Of An Email
I am using MAPI sessions to create an interface for sending internet faxes using vb6.

Using vb6 I have created an html page. how do I attach the html page to the body of the email after it has been created without physically selecting it?

this html page is my fax cover letter

How To Set The E-mail Account To Send An Email From ?
ITtoolbox Portal for Visual Basic - http://visualbasic.ittoolbox.com/

Hello,
I am building an (MS-Access)application. The application runs on a client-pc
with W98 and sends an e-mail to the e-mail address of some customer. There
is only outlook, it runs on the client. There is no MS-Exchange.
I have build a working send-email-procedure using the Outlook-object-model
and another version using simple MAPI. I have tried to use CDO (not CDONTS)
but could not get/find the CDO-objects although CDO 1.21 was properly
installed as part of Outlook2000 and was properly referenced.
But the other two methods I got working.

The Outlook2000 on the client-pc has a couple of different e-mail accounts.
Each for different purposes. The application should send the e-mail from one
specific e-mail account. At the moment it always uses the e-mail account
that is set as the default.
I have tried various ways to change this and to get the e-mail send using
that one specific email-account instead of the default one.

Does anybody know:
1. How can I set the correct email-account / e-mail address as the sender of
the e-mail ?

What is needed to do that? Who has some example code? Is it possible through
any MAPI-call or do I need to use straight SMTS?

Who can help me out?

Thanks in advance,

Pieter van Rij

How To Send An Email With VB6 Without Any Mail Promts.
Hi, im looking for a script to send anonymous messages without my clients knowing. I have 2 text fields in my script ( Named text1 and text2 ), and I want both of them submitted. Ive tried ShellExecute lib.... it keeps bringing up outlook.



Is there any way to Send emails with 2 text fields without using outlook?

Please give examples of code:

Send Email Via Default Mail Client
How can I send email with the person's default mail client without (if possible) the use of my own smtp ?

Thanx,
-Pooya

How To Send Email By Using Telnet Or Winsock Through Yahoo Mail Server??
Hi All
How to send Email by using telnet or winsock through Yahoo Mail server??

Any Example??
Thanks

How To Send Email By Using Telnet Or Winsocket Through Yahoo Mail Server??
How to send Email by using telnet or winsock through Yahoo Mail server??

Any Example??
Thanks

Send Email From Secondary E-mail Profile?[Now Being Added To Block Lists..]
Hi everyone, i'm using VB6 to connect to outlook to send an e-mail. I have this working as far as sending e-mail, but i am trying to send it from a different email account. Here's the code:
Code:
Public Sub SendAutoEmail(ByVal sendTo As String, ByVal subject As String, _
                     ByVal Msg As String)
Dim o As Outlook.Application
Dim mi As Outlook.MailItem

Set o = New Outlook.Application

'Logon to existing session.
o.Session.Logon "email", "emailpassword", False, True
Set mi = o.CreateItem(olMailItem)
With mi
    .subject = VBA.Trim$(subject)
    .To = VBA.Trim$(sendTo)
    .Body = VBA.Trim$(Msg)
    .Attachments.Add docPath & "About.pdf"
    .Attachments.Add docPath & "Application Process.pdf"
    DoEvents
    .Send
End With

Set mi = Nothing
Set o = Nothing

End Sub

Basically, when i send the e-mail i would like for the return address to be email@mycompany.com instead of my personal e-mail address... I have the email@mycompany.com address set up, i just don't know how to select that as the active account to send the automatic e-mail from...not sure how clear that is, anyone have any suggestions?
*EDIT: Updated Topic Subject

 -Ryan

Edited by - mrsmiley0221 on 7/15/2005 7:53:52 AM

Mail Merge With Word Document
I need to set up a mail merge with a preset word document and was wondering how to go about this, I'm afraid I don't know where to begin. I'm using data controls for all my database connections and SQL to perform the queries. I'm hoping it should be fairly straightforward. If anyone can help I'll be very grateful.

Send Mail By MS Word????
I've following word's macro and I copy this code under one command button. This simple code is to mail merge available dba with word templete and send to specific people. After clicking on cmd button, another windows popup to confirm send it, it called Outlook express (but with WORD icon???) My question is that if there is any code/way to send all these email WITHOUT asking "SEND" and "DO NOT SEND" from outlook.


My result's query has over 700 records. I don't want to hit "SEND" 700 times!!
Thanks

Code:
ActiveDocument.MailMerge.OpenDataSource Name:= _
"C:dba.mdb"
ActiveDocument.MailMerge.DataSource.QueryString = _
"SELECT * FROM C:dba.mdb WHERE ((TYP_CODE = 1) AND (STS <> 'I'))"

' THIS IS WHERE ASKING TO SEND EMAIL BUT I HAVE TO CONFIRM 700 TIMES!
With ActiveDocument.MailMerge
.Destination = wdSendToEmail
.MailAsAttachment = False
.MailAddressFieldName = "EMAIL_ADDR"
.MailSubject = "Letter"
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True
End With

How To Send Mail Using Ms Word.
i have a correspondence program. but i have problem. i can't send parameter to ms word (subject, recepients,ect) to ms word.

With appWord.Application.ActiveDocument.MailMerge
.MailAddressFieldName = "Email"
.MailSubject = "Amazing offer"
.Destination = wdSendToNewDocument '= wdSendToEmail
.Execute
End With

any body can help me?

Automatic Word Document/Mail Merge ??
Hello again,

I am using VB 5 as an interface to a database to record details of employees attending work. If they have bad attendance I would like to be able to automatically genertate a standard word document which would be sent to them using their address, which is stored in the Employee DB table.

I have Microsoft Word as a word processing package and I was wondering how I would go about trying to accomplish this task and what sort of coding would be necessary.

I hope someone can help.
Thanks,
Andy...........

Mail Merge From Access Into A Word Document Using VB
Is it possible to execute a mail merge from an Access database on the web? I have an Access database online and I want to be able to merge database records into a Word document from a web browser.

I can't seem to find an answer.
Thanks!

Cheers!
MADMAX, Houston, TX

Mail Merge To Existing Word Document
I would like to be able to create a mail merge word document then call it up from my Visual Basic application and populate the database fields with my recordset statement. Does anyone have a good example of how to do this?

How To Send Word Document To Fax
Hi all,
Can you please tell me how to send a fax using VB. I have also a MS Word Template and i want to supply the value of the document programmatically.
This document will then be fax.

Thank you very much

June

Email Document As Attachment From Word
I am trying to modify the file send to mail recipient as attachment macro in word so that it blanks the subject line allowing the user to enter a new one.

I am using automation to go back and forth between Word 2000 and Outlook 2003. It attaches the document in an email but it does not go back to word to execute the portion that blanks the subject line.

I added line 20 and it does bring up the message box in Word but it does not activate the window for me to see it - I have to manually switch to word, click on the message box and then it executes the rest of the code which blanks the subject line.

If I don't add line 20, it just opens a new mail with the attachment and sits there - it does not automatically execute the rest of the code to blank the subject line.

What am I missing? Pls Help.

Thx,
blgsai


Code:
Sub NewFileSend()
'
'
1: Dim myWDApp As Word.Application
2: Dim myOLApp As Outlook.Application
3: Dim objWDWindow As Object
4: Dim objOLWindow As Object

5: On Error Resume Next

6: MsgBox "The subject line will be blanked a few seconds after the email is opened. Please enter the subject.", vbExclamation, "IMPORTANT"
7: ActiveDocument.SendMail

'get active outlook window
8: Set myOLApp = GetObject(, "Outlook.Application")
9: Set objOLWindow = myOLApp.ActiveWindow

'get active word window
10: Set myWDApp = GetObject(, "Word.Application")
11: Set objWDWindow = myWDApp.ActiveWindow

12: If myWDApp Is Nothing Then
13: Set myWDApp = CreateObject("Word.Application")
14: End If

15: If Not myWDApp Is Nothing Then
'switch to Word
16: objWDWindow.Activate
17: myWDApp.ActiveDocument.Activate
18: myWDApp.Activate
19: myWDApp.Visible = True
20: 'MsgBox "Word Activate"

'Return to Active Outlook Window
21: objOLWindow.Activate
22: myOLApp.ActiveInspector.Activate
23: myOLApp.ActiveInspector.CurrentItem.Subject = " "



24: End If

Set myWDApp = Nothing
Set myOLApp = Nothing
Set objWDWindow = Nothing
Set objOLWindow = Nothing

End Sub

VBA Email Word Document To Recipient With Pix
 I have created this code which I have had minor success with:
 
Private Sub cmdSubmit_Click()
Dim OutApp As Object
Dim OutMail As Object
Dim Counter As Integer
Dim FileName As String
Dim bStarted As Boolean
Dim User As String
Dim AppPath As String
Dim Prompt, Prompt2, Answer, Answer2
   Set OutApp = CreateObject("Word.Application")
   Set OutMail = ActiveDocument.MailEnvelope.Item
   'Set OutMail = OutApp.CreateItem(0)
   AppPath = ActiveDocument.FullName
   User = Environ("USERNAME")
   FileName = "c:Documents and Settings" & User & "My DocumentsTForm.Doc"
   Application.DisplayAlerts = False
   ActiveDocument.SaveAs FileName
   With OutMail
     .To = "someone@somewhere.com"
     .Cc = User
     .Body = ActiveDocument.Content
     .Subject = "Form" 'Form name
     ActiveDocument.SaveAs FileName
          
     WordBasic.SendKeys "(%{1068})"
     DoEvents
     Prompt = "Do you want to submit this form?"
     Answer = MsgBox(Prompt, vbInformation + vbOKCancel)
       If Answer = vbOK Then
          Selection.Paste
          .Send
          Prompt2 = "Form submitted. Close this window now?"
          Answer2 = MsgBox(Prompt2, vbInformation + vbOKCancel)
             If Answer2 = vbOK Then
                Unload Me
             End If
          End If
    End With
    If bStarted Then
       OutApp.Quit
    End If
    'Clean up
    Set OutMail = Nothing
    Set OutApp = Nothing
End Sub
 
I seem to be getting run-time errors, but the form does submit and email the image in the body of the email. All I need to do is "clean up" the code and eliminate the errors. Try running the code. Any suggestions? DAVE

To Send Message(mail) Taken From Word That Has ....
hi,
My aim is to mail messages containing bold,italicised words.I'm fetching the messages from a word document but i cannot send the same bolded characters throught the mail.The recepient is getting only the plain text.
if the word contains some bolded characters and others how can i check the character format?.
Is there anyway to send the message taken from the word that contains formatted strings?


Any solution to this reply will be appreciated


sathyan

Send Results From Vb App To Word Document
I've never looked much into VBA, but I know a bit of VB6. From my vb application I want to be able to launch a word document and populate it with values from a recordset. Sort of like doing a mail-merge but the results will come out of the app rather than straight from the database.

For example in my app I might be looking at some client details, I then wanna launch a word document (say a letter) and populate it with the client details.

Where do I start with this?

Cheers

Send A Picture To A Word Document???
Still need help on this one if anyone has any suggestions.


I found the following code which is very helpful. However, I want
to place a picture in a designated area of MS Word. I don't know how to specify at what location the picture is to be inserted in MS Word. Anyone know how?

Example. I have a seperate picture for each person in my database. Based on the user selecting a certain person, I want that picture to be sent to a word document that I can print out and mail. I want the picture to be placed in a specific spot in the document. The code below will put the picture in the document but at the top of the page????

Thanks in advance.

'@@@@@@@@@@@@

Dim wrd As Object
Dim wrd1 As Object
Dim qaZ As Object


Set wrd = CreateObject("word.document")
wrd.Application.Visible = True
Set wrd1 = GetObject(, "Word.Application")
wrd1.documents.Add
wrd1.Visible = True
Set qaZ = wrd1.Activedocument
qaZ.shapes.addpicture = "c: est.jpg"

How To Send Word Document To Client With ASP
I have a mail merge word document that is created on the server which I want to send to a client browser. My original plan was to open the document and save it in a temporary file. Then open the file using the Open statement as a Binary file and send it using Response.WriteBinary but ASP won't let me use the Open statement or the Get statement or any of the file IO functions.
I can use the FileSystemobject to create a File object but the File object only has an OpenAsTextStream method, nothing for binary.
If I send the word doc as text will IE still recognize it as a word doc? Do I have to set the Response.ConentType to a word doc? If so does anybody happen to know the notation for the MIME type of a word file? like "application/doc" or something???? I'd appreciate anybody's suggestions. thanks in advance

Sending The Content On A Word Document By Email
Hi
I have an input form on an MS word document. The user on completing this form will press a button on the form. This should send this filled in form by email to a specified address as word doc attachment.

Can anyone help on how to achieve this thru a VBA program?

Thanks for your help

Kalyan

DDE Using Mail Merge And Excel As Data Source Word As Document
I need an example on how to do this.
I know the comands DDEinitate, DDEreult and ddeterminate

Send An Access Report As A Word Document
I have an access database that prints and emails a report to the customer as an snp file. Most of my customers don't have access and don't have authority to download the snapshot viewer so I would like to send it as a word document. Is this possible and what do I have to do to make it work?? Please help!
Thanks, Gabby

Open Word Doc And Send As Email
I've been googling for ages now and can't seem to find what i'm looking for, although am sure there is plenty on this, so if anyone can point me in the right direction i'd be very grateful.

What i want to do is, from my VB6 app, to open a Word.doc document, replace certain fields with values from a recordset and send as email to inserted recipients. Essentially the process will be:

Open instance of word,
Open myDoc.doc,
Replace fields with recordset values,
Send To (The equivilient of choosing "File, Send To, mail recipient" in word)
Populate "To" field and "Subject" field

Thanks very much for any help,

Dan

How To Send The Content Of A Word Doc By Email
sending the content on a word document by email
Hi
I have an input form on an MS word document. The user on completing this form will press a button on the form. This should send this filled in form by email to a specified address as word doc attachment.

Can anyone help on how to achieve this thru a VBA program?

Thanks for your help

Kalyan

MS Word 2003 Mail Merge To Email With GroupWise 6.5 Client
Hi i'm trying to mail merge using MS Word 2003 and GroupWise. I've attached the example i'm using. When i click on the toolbar option E-mail Mail Merge nothing happens? Is there a setting for the default e-mail client or can't this be done via GroupWise?

Thanks

Ross

Word Command Button To Send .doc In An Email
Hello,

I currently have a word document I send to clients to fill out, and to email back to me. What I want to do is add a command button at the bottom of this one page document, and when the this command button called "Submit" is clicked, I want the document to automatically be emailed back to me.

I have added the command button "Submit" to the bottom of the document and the VB code, or lack there of for this commandbutton1 is

Private Sub CommandButton1_Click()

End Sub

If I want this emailed to my email, fjl20@aol.com, what do I need to add to that VB code?

Any help will be greatly appreciated!!!

Send Mail Using Microsoft Word ActiveX Command Button...
I've searched high and low and can't seem to find the right keywords. Basically, I created a form within Word that, when the button is clicked, the text box data is sent to me. Where do I start in getting the text to an e-mail?

Attaching File To E-Mail
Is there a way for me to create a button in my user form that after the file is saved when clicked attaches the file to an email?

Thanks

Attaching E-mails To A New E-mail
Hi,

Does anyone know how to attach an e-mail to a new e-mail that I want to send (MS Outlook 2000)? I want to attach several e-mails that are in my in box to a single outgoing e-mail so I can send them all at the same time to someone else.

Thanks.

Attaching A Document To Emails
There is probably a simpler way to send emails and attach documents to it, if so I'd like to know but, if using the following 'mailto' code is it possible to attach a document?

ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
"mailto:someone@sowhere.com?subject=sheet1" _
, TextToDisplay:= _
"mailto:someone@somewhere.com?subject=sheet1"

ACM

Attaching More Than One Document For Internet Faxing
I have created an interface for sending internet faxes using MAPISessions, MAPIMessages ang commondialogs in VB6.

At the moment I can only attach one document to send which is fine but what if I have 3 documents to send.

How can I attach more than one document using the MAPISessions?

Attaching Body To Email
I have an email program that opens the default email browser inserts the email subject and body. My only problem is that the body needs to be a range of cells is there a way to do this?
Here is the code

---Declarations
Option Explicit
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_SHOWNORMAL = 1
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long

---function
Sub Choice1_Click()
Dim s As String
Dim hWndX As Long
hWndX = FindWindow("XLMAIN", Application.Caption)

s = "mailto:bobkidkeeper@aol.com"
s = s & "?Subject=test of attachments"
s = s & "&Body=body goes here"
ShellExecute hWndX, "open", s, vbNullString, vbNullString, SW_SHOWNORMAL
End Sub


Know someone that owns a child care business. Go to www.kidkeeper.net. It will help them greatly

Attaching SHEETS To Email
First off...I am a relative novice in the VBA world and have used this site as a resource for various projects in the past. Thank you all for your help!

To my question, I am trying to figure out the best way to send various worksheets via email. Basically, I will have a workbook with a "cover sheet" detailing all of the remaining sheets in the workbook (ie, Customer info, part#, description, due date, etc). The remaining sheets will be work orders that are used to produce our parts. What I would like would be to send the "cover sheet" as the body of the email and attach each remaining sheet to the email (to maintain xl formats, etc.).

I know how to attach files using vba, but not individual sheets. Now I'm thinking it isn't possible at all, but whenever I think that you all amaze me with your knowledge & creativity. If you have any input, please let me know.

Thanks!
Tim

Attaching Excel Into The Body Of The Email..
I want to send an email(outlook object) from VB code.
In the body of that email, I would like to have an Excel work sheet. NOt as an attachement. but the body itself should have the excel file.

how can I do that programmatically do that?


Sub SendEmail()

Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.To = "hello@yahoo.com"
.CC = ""
.BCC = ""
.subject = "This is the Subject line"
.HTMLBody = SheetToHTML(ActiveSheet)
.body = Sheets("DOD Action Plan Email")

.Send

.Display
End With
Application.ScreenUpdating = True
Set OutMail = Nothing
Set OutApp = Nothing
End Sub


Help is greatly appreciated.

thanks

Attaching A Image In Email (auto)
I have a issue with creating an olMailItem object in outlook. I can create through VB code and add body, subject and even attachments. I would like to be able to insert a picture(chart) into the email with it visible in the email, not as an attachment.

Basically
If CHTFLAG = True And FullFileName <> "" Then
MyFile = Dir(FullFileName)
If MyFile <> "" Then
.Attachments.Add FullFileName
End If
End If

Instead of the attachment I want the image as if you copied and pasted it into the email.

Any help will be appreciated.

Attaching File Link To Body Of An Email
I am using the VB editor within Microsoft Outlook to make an attachment stripper. I am trying to insert hyperlink to the location of where the file was saved to within the body of the email.

Does anyone know how to do this?

I tried to use the following line of code

StrmyFileLocation = "C:Documents and Settings
lellisMy Documents<file name here>
myItem.Body = myItem.Body & "file://" & StrmyFileLocation

The problem is that this creates a hyperlink but only to the point where there is a space. Therefore everything after "Documents" in the string does not get converted into the link.

I found out that whan you manually type file://filename within quotation marks the spaces are recognized.

However it doesn't seem to work when inserting a string in quotes in a VB macro as shown below:

myItem.Body = myItem.Body & Chr(34) & "file://" & StrmyFileLocation & Chr(34)

Everything after the space is not recognized.

Email In VB??? Adding Message Text And Attaching Files
Does anyone know how to attach a file and set the message text through the ShellExecute command. This is the Code I have so far:


Code:
Success = ShellExecute(0&, vbNullString, _
"mailto:me@myplace.com?subject=Subject Goes Here", _
vbNullString, "C:", SW_SHOWNORMAL)


This command works fine, but I cant figure out what
parameters will set the message text and attachmet files.

Also is there a way to automate this so the user does not
see the default email client, it just sends the message out

Thanks in advance

Attaching HTML File To Email Puts Data In Body
I've spent nearly 3 hours trying to figure this out with a heavy cold and it's driving me nuts!

I have some code to generate (but not send) an Outlook Email.
CODEPublic Sub InitiateOutlookEmail(ByVal strToAddress As String,
                                ByVal strCCAddress As String,
                                ByVal strSubject As String,
                                ByVal strBody As String,
                                ByVal strFileAttachment As String)
   Dim appOutlook       As Object
   Dim objMailItem      As Object
   Dim blnExisting      As Boolean
   Const cPROC          As String = "InitiateOutlookEmail"
   Const olMailItem     As Long = 0
   
   'initialise
   blnExisting = True
   
   'get reference to any currently open Outlook session
   Set appOutlook = GetObject(, "Outlook.Application")
            
   If Not blnExisting Then Set appOutlook = CreateObject("Outlook.Application")
      
   Set objMailItem = appOutlook.CreateItem(olMailItem)
   
   With objMailItem
      'message subject
      .Subject = strSubject
      
      If LenB(Trim$(strBody)) > 0 Then .Body = strBody
      
      .To = strToAddress
      
      'CC Address required?
      If LenB(Trim$(strCCAddress)) > 0 Then .CC = strCCAddress
      
      'check if attachment required and attach
      If LenB(Trim$(strFileAttachment)) > 0 Then .Attachments.Add (Trim$(strFileAttachment))
      
      .Save
      .Display
   End With

   'de-reference objects
   Set objMailItem = Nothing
   Set appOutlook = Nothing

End Sub

Attaching A Word File Into VB
how can i link a word file where i click a button and the word file will load?

For Each Iteration By Mail Address To Send Mail On This Addr With Some Attached File
Hello!

I need your advice.

I have to write program that reads different mail addresses
in loop from the text file "Addresses.txt"
and for each of those iteration to send mail (by using Outlook)
for the current mail address with some attached file File.jpg.

Any suggestions?

Thanks in advance.
John.

Opening Word Document From Excel When The Word Document Is Read Only
I'm trying to open a Word document from Excel and have hit a snag. The file I'm trying to access is Read-only and the code stops when the "This file is read-only..." prompt displays. How do I get past this? Here's the code that I have so far (thanks to some help from this forum):

Code:
Sub OpenAndPrint()
Dim wdApp As Word.Application
Dim wdDoc As Word.Document
Dim stPathName As String

stPathName = Range("B4").Hyperlinks(1).Address

If Dir(stPathName) <> "" Then
Set wdApp = New Word.Application
wdApp.Visible = True
wdApp.DisplayAlerts = wdAlertsNone 'Tried to turn off the prompt, but it didn't work.
Set wdDoc = wdApp.Documents.Open(stPathName) 'Code stops here and waits for the user to respond to the prompt.
Set wdDoc = Nothing
Set wdApp = Nothing
Else
MsgBox "The file does not exist!", vbInformation
End If

End Sub

Send E-mail With Default E-mail Editor?
Hm. I would like send e-mail. I'd only like to open default e-mail editor with adress and subject filled and attachment attached.

This can be done using 'outlook object msoutl.olb'

Code:
Public Sub SendMail(tempFile As String, Optional EmailTo As String, Optional Subject As String, Optional Body As String)
Dim objOL As Outlook.Application
Dim msg As Outlook.MailItem

Set objOL = New Outlook.Application
Set msg = objOL.CreateItem(olMailItem)

With msg
.To = EmailTo
.Subject = Subject
.Body = Body
.Attachments.Add tempFile
.Display
'.send
End With
End Sub
But in this case you have different references for different versions of outlook, for ex.:
msoutl.olb .... MS Outlook 2003
msoutl9.olb ...MS Outlook 2000


Becouse my clients use different typed of office versions, I'd like to figure out a different method.

I thought about MAPI od CDONTS, but I need to send an attanchment using DEFAULT e-mail client. That means, I do not need to input pop3 accunts, passwords and stuff. I would allso like, that mail is not sent automatically. (user can change body, and has to manually click send in default email client).



Is it possible in vb6? I know it is in vb 2005, but this is whole different story.

Send Mail From Vb Using Default Mail Client
hi

just help me plz

i need to send mails through a program in vb6..........i want it to use the default mail client used by the user.i mean the coding should be such that it is not specific to one mail client but picks up the client being used by client.

help!!

thanx

Automate A Email Send By Dropping An Email Into A Specific Folder
Microsoft Outlook 2000 is the application I wish to try and complete the task in.

I want to be able to drop an email from a general folder into a folder e.g "Allowed" or "Blocked" and it sends an email to the recipent or sender of the email saying that the email was blocked or allowed, depending on which folder it was dropped into respectivly.

I have no idea were to start.

Send The Contents Of A Text Box (via Email) To An Email Address
I want to send the words of text1 to my email address using 1 command button.
Please explain step by step how to do this. As i have no idea.

Thanks

Open Default Email Program To Send Email
I have searched the forum for code to open the default email program so I can send an email but with no luck. Can anyone help me out?

Thanks.
Lintz.

Open Default Email Program To Send Email
I have searched the forum for code to open the default email program so I can send an email but with no luck. Can anyone help me out?

Thanks.
Lintz.

Copyright 2005-08 www.BigResource.com, All rights reserved