Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert plain text and not attachment
Message
De
04/12/2001 09:39:33
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
COM, DCOM et OLE automation
Titre:
Insert plain text and not attachment
Divers
Thread ID:
00589254
Message ID:
00589254
Vues:
54
Hi,

Can someone tell me how I can insert a plain text into
outlook body (and not attachment) using OLE automation
through VB? For example following code in Access 2K would
create the message but it attaches the textfile in stead
of plain text on the body.

Thanks for any assistance.

Regards
++++++++++++
Private Sub Email2Client(cFileName, cMsgSub)
    Dim cEmailList As String

    Dim oOutlook As Object
    Dim oEmailmsg As Object
   
    Set oOutlook = GetObject(, "outlook.application")
    Set oEmailmsg = oOutlook.CreateItem(0)
    cEmailList = "abc@everybody.com"
    oEmailmsg.Recipients.Add (cEmailList)
    oEmailmsg.Attachments.Add cFileName, 1
    oEmailmsg.Subject = cMsgSub
    oEmailmsg.Display
End Sub
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform