Hi again
I am nearly finished with my routine but for one thing:
I need to use my draft message several times since I have seeral recepients.
How is it possible to keep my draft message available in the Draft folder
once I have sent the message?
Here's my code below.
TIA
Cordially
Pascal
Public TtxMsg$
Public Chemin$
Sub Testit()
Dim i&
Dim NbContacts&
Chemin = ThisWorkbook.Path & Application.PathSeparator
Dim AppOutlk As Outlook.Application
Dim OutlookAeteDemarre As Boolean
Dim Espace As Outlook.Namespace
Dim LeDossier As Outlook.MAPIFolder
Dim Lemsg As Outlook.Items
On Error Resume Next
Set AppOutlk = GetObject(, "Outlook.Application")
If Err <> 0 Then
Set AppOutlk = CreateObject("Outlook.Application")
OutlookAeteDemarre = True
End If
Dim LaFVx As Worksheet
Set LaFVx = ThisWorkbook.Worksheets("Voeux")
NbContacts = LaFVx.Cells(65536, 1).End(xlUp).Row
'Pour chque ligne users
For i = 1 To NbContacts
Set Espace = AppOutlk.GetNamespace("MAPI")
Set LeDossier = Espace.GetDefaultFolder(olFolderDrafts)
With LeDossier.Items(1)
.Recipients.Add LaFVx.Cells(i, 1).Value
.Send
End With
Next i
'Killer process outlook si demarré
If OutlookAeteDemarre Then AppOutlk.Quit
''libérer les variables
Set AppOutlk = Nothing
Set Lemsg = Nothing
Set LaFVx = Nothing
End Sub
> Hi all
> I am using a routine in Excel to send a message to several contacts listed
[quoted text clipped - 15 lines]
> Cordially
> Pascal
Michael Bauer - 30 Dec 2005 07:46 GMT
Am Thu, 29 Dec 2005 18:08:14 +0100 schrieb papou:
Pascal, call the Copy function of your draft and send that instead of the
original draft.

Signature
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
> Hi again
> I am nearly finished with my routine but for one thing:
[quoted text clipped - 65 lines]
>> Cordially
>> Pascal
papou - 30 Dec 2005 08:14 GMT
Hello Michael
Can you explain how to do this?
TIA
Cordially
Pascal
> Am Thu, 29 Dec 2005 18:08:14 +0100 schrieb papou:
>
[quoted text clipped - 73 lines]
>>> Cordially
>>> Pascal
papou - 30 Dec 2005 08:41 GMT
Michael
Forgert my last message I found out how to achieve this.
Many thanks
Cordially
Pascal
> Hello Michael
> Can you explain how to do this?
[quoted text clipped - 82 lines]
>>>> Cordially
>>>> Pascal