Article View: be.comp.programming
Article #12028Re: VB & Outlook
From: f�t��y w�m
Date: Sat, 29 Dec 2001 11:16
Date: Sat, 29 Dec 2001 11:16
104 lines
4131 bytes
4131 bytes
yesss, that's it :)
bedankt, maar nog een klein probke: de berichten komen niet aan..
"Eddy Van der Stock" <sky40490@skynet.be> wrote in message
news:3c2cb842$0$33503$ba620e4c@news.skynet.be...
> Probeer dit eens ...
>
> Option Explicit
>
> 'Use early binding to create a new Outlook application object
> Public olApp As New Outlook.Application
> Public nsMAPI As Outlook.NameSpace
> Public myAttachment As Attachment
>
> Public adl As Outlook.AddressList
> '-----------------------------------------------------
> 'Create a new mail message
> Public Sub NewMailMessage(ImmediateSend As Boolean, theRecipient As
String,
> _
> theSubject As String, theBody As String, _
> anAttachment As Boolean, theAttachment As String)
> Dim itmMail As Outlook.MailItem
>
> 'Return a reference to the MAPI layer
> Set nsMAPI = olApp.GetNamespace("MAPI")
>
> 'Create a new mail message item
> Set itmMail = olApp.CreateItem(olMailItem)
> With itmMail
> 'Add the subject of the mail message
> .Subject = theSubject
> 'Create some body text
> .Body = theBody & vbCrLf
>
> 'Add a recipient and test to amke sure that the
> 'address is valid using the Resolve method
>
> With .Recipients.Add(theRecipient)
> .Type = olTo
> If Not .Resolve Then
> MsgBox "Unable to resolve address.", vbInformation
> Exit Sub
> End If
> End With
> If anAttachment = True Then
> 'Attach a file as a link with an icon
>
> ' Set myAttachment = itmMail.Attachments.Add(theAttachment,
> olByValue, 0, "Prijsofferte")
>
> With .Attachments.Add(theAttachment, olByValue, 0,
> "Prijsofferte")
> '.DisplayName = "UCW"
> End With
> End If
> If ImmediateSend = False Then
> 'Display the item
> .Display
> Else
> 'Send the mail message
> .Send
> End If
> End With
>
> 'Release memory
> Set itmMail = Nothing
> Set nsMAPI = Nothing
> Set olApp = Nothing
>
> 'NewMailMessage False, "Aphrosoft@skynet.be", "test", "ikke", True,
"c:\
> temp\bestand"
>
> End Sub
>
>
> mvg
>
> Eddy
>
>
> "f�t��y w�m" <wimbervoets@pandora.be> wrote in message
> news:Hs6R7.18715$ZJ2.1121586402@hestia.telenet-ops.be...
> > ik zou graag een mailformulier oproepen vanuit het hoofdprogramma. Je
zou
> > het formulier kunnen vergelijken met hetgeen dat je krijgt als je op een
> > html-pagina op een e-maillink drukt. Dan verschijnt er een formulierke
met
> > 'Aan', 'CC', en ook plaats voor je eigenlijke mail te typen.
> > Zoiets zou ik dus willen oproepen.., is dit mogelijk? En indien ja,
welke
> > componenten moeten er dan eventueel toegevoegd worden aan het form?
> >
> > cya
> >
> >
> >
> >
> >
> >
>
>
Technical Details
Message-ID:
<YBhX7.902$Gj.371900743@hebe.telenet-ops.be>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!195.158.233.21!news.ebone.net!news1.ebone.net!skynet.be!skynet.be!ossa.telenet-ops.be!hebe.telenet-ops.be.POSTED!not-for-mailReferences:
<Hs6R7.18715$ZJ2.1121586402@hestia.telenet-ops.be> <3c2cb842$0$33503$ba620e4c@news.skynet.be>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: fcea4,9e3245a7c179de4d X-Google-Attributes: gidfcea4,public X-Google-ArrivalTime: 2001-12-29 03:16:11 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!195.158.233.21!news.ebone.net!news1.ebone.net!skynet.be!skynet.be!ossa.telenet-ops.be!hebe.telenet-ops.be.POSTED!not-for-mail From: "f�t��y w�m" <wimbervoets@pandora.be> Newsgroups: be.comp.programming References: <Hs6R7.18715$ZJ2.1121586402@hestia.telenet-ops.be> <3c2cb842$0$33503$ba620e4c@news.skynet.be> Subject: Re: VB & Outlook Lines: 106 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: <YBhX7.902$Gj.371900743@hebe.telenet-ops.be> Date: Sat, 29 Dec 2001 11:16:08 GMT NNTP-Posting-Host: 213.224.80.205 X-Complaints-To: abuse@pandora.be X-Trace: hebe.telenet-ops.be 1009624568 213.224.80.205 (Sat, 29 Dec 2001 12:16:08 CET) NNTP-Posting-Date: Sat, 29 Dec 2001 12:16:08 CET Organization: Telenet Internet