Live-Forum - Die aktuellen Beiträge
Anzeige
Archiv - Navigation
168to172
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
168to172
168to172
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
Inhaltsverzeichnis

Serienmail in Outlook mit Dateianhang

Serienmail in Outlook mit Dateianhang
15.10.2002 15:26:44
N. Davidheimann
Hallo allerseits,

wie kann ich über VBA ein mail mit gleichem Betreff und gleichem Text an verschiedene Adressaten schicken ? Weiterhin müßte an die mail für den einzelnen Adressaten die Datei lt. folgendem Ausschniit angehängt werden:

Gruß
Norbert


8
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
Re: Serienmail in Outlook mit Dateianhang
15.10.2002 15:43:06
bernd
Hallo Norbert,

ich glaube nicht, daß der Beitrag hierher gehört :-(, aber aus Erfahrung kann ich Dir sagen, daß Du hier auf Granit stoßen wirst. ICh habe einen Programmierung mal im Internet gesehen, nachdem wir das gleiche Problem hatten und das zum Beispiel mit Wörd nicht ohne weiteres hinbekommen haben. Das Problem ist der Anhang!!! Es gibt aber Mailer, die so etwas können, auch im Internet auffindbar.

Sorry, daß ich Dir nicht besser helfen kann.

Gruß

Bernd

Danke an Bernd aber weiter offen
15.10.2002 15:48:27
N. Davidheimann
Hallo Bernd,

warum nicht hierhin ?? Will über VBA aus Excel diesen Versand anstoßen.

Gruß
Norbert

Anzeige
Re: Danke an Bernd aber weiter offen
15.10.2002 16:08:08
Bernd
Hallo Norbert,

ich glaube trotzdem nicht, daß das so ohne weiteres möglich sein wird, denn Du wirst an dem zusätzlichen Attachement scheitern (wie ich im übrigen auch).

Und wenn ich Dich richtig verstehe, willst Du auch keine Excel Tabellen per eMail verschicken, sondern die Exceldatei als Datenbank für das Serienmail hernehmen.

Sollte ich mich irren, dann Zeichne, bzw versuche es, den Vorgang als Makro aufzuzeichnen.

Aber was hällst Du davon bei mal unter http://support.microsoft.com
mal zu suchen. Die haben auch recht gute Lösungen.

Und wenn ich mich Irre, dann wäre ich natürlich an der Lösung auch interessiert.

Gruß

Bernd

Anzeige
Schau mal hier rein
15.10.2002 16:18:19
Bernd
Hallo Norbert,

ich hab etwas gefunden, was Dir eventuell weiterhelfen könnte.

Es handelt sich dabei um den MS Artikel Q241498 aus der Knowledge Base.


Der Artikel:

This article contains a Microsoft Visual Basic for Applications macro for Excel that uses Microsoft Outlook 2000 to generate and send a form e-mail to individuals that are listed in an Excel worksheet.

This macro assumes the following:
E-mail addresses are in column A.
Names are in column B.
Cells A1 and B1 contain headers.
To create the macro:
Start Excel. Create a new workbook, and open the Visual Basic editor (press ALT+F11).
On the Insert menu, click Module.
On the Tools menu, click References.
In the Available References list, click to select the Microsoft Outlook 9.0 Object Library check box. Click OK.
Type the following code into the code module:
'--- Set up the Outlook objects.
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment

'--- Declare our global variables to be used in each subroutine.
Dim CustomerAddress As String
Dim CustomerMessage As String

Sub MailItNow()

'--- Declare our variables.
Dim X As Integer
Dim TempCustomerAddress As String

'--- Prevent screen redraws until the macro is finished.
Application.ScreenUpdating = False

'--- Sort the addresses and names alphabetically, by the e-mail address.
'--- This is REQUIRED to prevent any duplicate addresses from
' receiving more than one e-mail.

Columns("A:B").Select
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

'--- Sets which row to start searching for e-mail addresses and names.
X = 2

'--- Begin looping through all the e-mail addresses in column A until
' a blank cell is hit.
While Range("A" & X).Text <> ""

'--- These variables will be used to search for duplicates.
CustomerAddress = Range("A" & X).Text
TempCustomerAddress = CustomerAddress

'--- Increment X until a different e-mail address is found.
While TempCustomerAddress = CustomerAddress
X = X + 1
CustomerAddress = Range("A" & X).Text
Wend

'--- Add the e-mail address to a global variable.
CustomerAddress = Range("A" & X - 1).Text
'--- Add a message with the user's name to the e-mail.
'--- Customize your own message and closing here.
CustomerMessage = Range("B" & X - 1).Text & "," & vbCrLf & vbCrLf _
& "Thank you for trying our product!" & vbCrLf & vbCrLf & _
"Sincerely," & vbCrLf & "ProductCo Inc."

'--- Run the subroutine to send the message.
Call SendMessage

Wend

End Sub

Sub SendMessage(Optional AttachmentPath)

'--- This is required to prevent a name which does not resolve to
' an e-mail address from hanging the app.
On Error Resume Next

' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")

' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

With objOutlookMsg
' Add the To recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add(CustomerAddress)
objOutlookRecip.Type = olTo

' Set the Subject, Body, and Importance of the message.
.Subject = "Thank You!"
.Body = CustomerMessage
.Importance = olImportanceHigh 'High importance

' Add attachments to the message.
If Not IsMissing(AttachmentPath) Then
Set objOutlookAttach = .Attachments.Add(AttachmentPath)
End If

' Resolve each Recipient's name.
For Each objOutlookRecip In .Recipients
objOutlookRecip.Resolve
If Not objOutlookRecip.Resolve Then
Exit Sub
End If
Next
.Send '--- Send the message.

End With

'--- Remove the message and Outlook application from memory.
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
End Sub

On the File menu, click Close and Return to Microsoft Excel.
To run the code, make sure the address database sheet is active. On the Tools menu, point to Macro, and click Macros. Click MailItNow, and then click Run.

Ich hoffe es Hilft weiter und Herbert nimmt das in seinen Beispielen auf, sofern er es noch nicht hat

Anzeige
Re: Danke an Bernd aber weiter offen
15.10.2002 16:21:42
N. Davidheimann
Hallo Bernd,

könnte mir vorstellen (ohne es bisher ausprobiert zu haben), daß und folgendes weiterbringt:

https://www.herber.de/mailing/109400h.htm

Gruß
Norbert

Re: Danke an Bernd aber weiter offen
15.10.2002 16:26:07
Bernd
Hallo Norbert,

Danke

Da war ich aber mit meinem Fund auch nicht schlecht :-)

Schau es Dir einfach an.

Ist oben unter "Schau mal hier rein" geposted.

Bernd


Re: Danke an Bernd aber weiter offen
15.10.2002 16:28:56
N. Davidheimann
Hallo Bernd,

hatte sich überschnitten. Werde heute abend mal die Sache testen.

Gruß
Norbert

Re: Danke an Bernd aber weiter offen
15.10.2002 16:31:41
Bernd
Hallo Norbert,

nicht für ungut.

Viel Spaß beim Testen.

Schönen Abend noch.

Gruß

Bernd

Anzeige

311 Forumthreads zu ähnlichen Themen

Anzeige
Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige