Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Excel 2007 VBA-Programmierung


  • Please log in to reply
1 reply to this topic

#1 vulcain

vulcain

  • Members
  • 165 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:France
  • Local time:12:58 AM

Posted 23 June 2013 - 02:35 PM

Hello,
 
In an Excel 2007 workbook, be as follows:
<Name> <Email Address> <Attachment> <message>
 
By pressing a button linked to the macro, I want the macro to read the file and automatically sends emails.
 
The macro must contain instructions compatible for the following messaging:
 
Thunderbird - Outlock - Incredimail -
 
I know little about VBA, so if it was possible to help me.
 
thank you in advance,
cordially

 



BC AdBot (Login to Remove)

 


#2 vulcain

vulcain
  • Topic Starter

  • Members
  • 165 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:France
  • Local time:12:58 AM

Posted 25 June 2013 - 09:32 AM

Hello,
 
Here is a code I would like to full thunderbird, incremail and seizure from a list in an excel spreadsheet file.

 

 

******************************* appel
Call EnvoyerMail("name@adresse.com", "TitreMail", "message mail", "piecejointe")
 
 
******************************* fonction
 
Sub EnvoyerMail(AdresseMail As String, ObjetMail As String, CorpsMail As String, AttachMail As String)
Set objOL = New Outlook.Application
Set objMail = objOL.CreateItem(olMailItem)
'construction du mail
With objMail
    .To = AdresseMail
    .Subject = ObjetMail
    .Body = CorpsMail
    If AttachMail <> "" Then
        .Attachments.Add AttachMail
    End If
    .Display
End With
Attendre (3)
'simulation d'appui des touches du clavier
SendKeys "%v", True
'réinitialisation des variables
Set objMail = Nothing
Set objOL = Nothing
End Sub
 
************************************ tempo
 
Sub Attendre(Secondes As Integer)
' Cette procédure temporise pendant le nombre
' de secondes qu'on lui transmet en argument
Dim Début As Long, Fin As Long, Chrono As Long
Début = Timer
Fin = Début + Secondes
Do Until Timer >= Fin
    DoEvents
Loop
End Sub





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users