Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

E-Mails mit hilfe von VB 6 versenden!!

Empfohlene Antworten

Veröffentlicht

Hallo!

Ich bin ein bissl am verzweifeln, weil ich nicht soooo viel von Programierung verstehe!

Kann mir vielleicht jemand erklären, wie ich einen eingelesenen Text, mit hilfe von VB AUTOMATISCH als E-Mail versende??? Habe nämlich keine Ahnung :( !!

Vielen Dank schon ma im vorraus für eure hilfe :D

mfg

MHQ

willst du dann den text mit hilfe von outlook versenden?

wenn ja dann kannst des so machen... einfach unten ein button hinmachen und dann den code


Sub Schaltfläche1_BeiKlick() 

  ' Aufruf Unterprogramm "senden"

  Call senden

End Sub


'---------------------------------------------------------------


Private Sub senden()

  ' Outlook Applikation

  Dim ool As Outlook.Application

  Dim oInspector As Outlook.Inspector

  Dim oMail As Outlook.mailitem

  Dim myattachments As Variant


  ' Für Inputbox "EMailadresse-Änderung"

  Dim Mldg, Titel, Voreinstellung, MailAdress



  ' Adresse anzeigen und Änderung ermöglichen

  Mldg = "Ist die angegebene Emailadresse richtig?"

  Titel = "Mailadresse"

  Voreinstellung = "liste@chello.at"

  MailAdress = InputBox(Mldg, Titel, Voreinstellung)


  ' Wurde Abbrechen gedrückt, dann alles beenden

  If MailAdress = "" Then Exit Sub


  ' Verweis zu Outlook + neue Nachricht

  Set ool = CreateObject("Outlook.Application")

  Set oMail = ool.CreateItem(olMailItem)

  Set myattachments = oMail.Attachments


  ' Befreff-Zeile

  oMail.Subject = "Stand dieser Liste: " & _

    Format(Date, "Long Date") & " !"


  ' An-Zeile (Empfänger)

  oMail.To = MailAdress   ' "g.huber@unilog.at"

  oMail.Recipients.ResolveAll

  oMail.Display


  ' Texteingabe (Nachricht selbst)

  oMail.Body = "Hier die Exceldatei, bitteschön..."



  ' Anhang 

  ' Nachfolgend ein Beispiel. Suchen Sie sich eine Datei auf

  ' Ihrem Rechner aus - vollständiger Pfad muß mitangegeben

  ' sein.

  ' Es können auch weitere Dateien angegeben werden.

  ' Hierzu einfach mit myattachments.Add "???" fortsetzen.

  myattachments.Add "D:\Eigene Dateien\Beispiel.xls"


  ' Speicher freigeben

  Set ool = Nothing

  Set oInspector = Nothing

  Set oMail = Nothing

End Sub

@Tobe

Vielen Dank für den code!! Hast mir echt geholfen.

:uli

ich hät das allein nicht hinbekommen!!

MFG

MHQ

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.