Supportnet Computer
Planet of Tech

Supportnet / Forum / E-Mail/Outlook

E-Mail aus Excel versenden





Frage

Sub MakroX() ´ Tastenkombination: Strg+x Windows("VersandmeldungX.xls").Activate Range("C3:P3").Select Selection.Copy Windows("SU-Nr.xls").Activate ActiveWindow.WindowState = xlNormal [C:C].SpecialCells(xlBlanks).Cells(1).Select ActiveSheet.Paste Windows("VersandmeldungX.xls").Activate Range("A3").Select Selection.Copy Windows("SU-Nr.xls").Activate ActiveWindow.WindowState = xlNormal [A:A].SpecialCells(xlBlanks).Cells(1).Select ActiveSheet.Paste ActiveWorkbook.Save Range(ActiveCell, Cells(ActiveCell.Row + 0, ActiveCell.Column + 1)).Select Selection.Copy Windows("VersandmeldungX.xls").Activate Range("A3").Select ActiveSheet.Paste Windows("VersandmeldungX.xls").Activate If Range("C3").Value = "SIM" Or Range("C3").Value = "sim" Or Range("C3").Value = "Sim" Then Dim strDateiname As String Dim strAntwort As String strDateiname = Range("B3").Value & Range("C3").Value & ".XLS" ActiveWorkbook.SaveAs ("C:\Dokumente und Einstellungen\Admin\Desktop\Versand\USA\" & strDateiname) Application.DisplayAlerts = False Range("A2:P30").Select Selection.Copy ActiveWorkbook.Saved = True ActiveWindow.Close Dim ol, Mail As Object Set ol = CreateObject("msimn.exe.Application") Set Mail = ol.CreateItem(0) Mail.Subject = " Versandmeldung " & Now Mail.To = "...@..de" Mail.cc = "" Mail.bcc = "" Mail.body = Chr(13) Mail.Display Application.SendKeys "{TAB}" Application.Wait (Now + TimeValue("0:00:02")) Application.SendKeys "{Tab}" Application.SendKeys ("^v") Application.SendKeys "%s" Workbooks.Open Filename:="C:\Dokumente und Einstellungen\Admin\Desktop\Versand\VersandmeldungX.xls" [A:A].SpecialCells(xlBlanks).Cells(1).Select ActiveCell.Value = Date Range("C3").Select Else: strDateiname = Range("B3").Value & Range("C3").Value & ".XLS" ActiveWorkbook.SaveAs ("O:\Versandmeldung\" & strDateiname) ActiveWorkbook.Saved = True ActiveWindow.Close Workbooks.Open Filename:="O:\Versandmeldung\VersandmeldungX.xls" [A:A].SpecialCells(xlBlanks).Cells(1).Select ActiveCell.Value = Date Range("C3").Select End If End Sub [*][quote][sup][i]Admininfo: bitte vermeide Mehrfachanfragen in verschiedenen, bzw. gleichen Gruppen. Siehe [url=https://supportnet.de/groupfaqs/3][u]FAQ2.[/u][/url][/i][/sup][/quote]

Antwort von



Ich möchte kostenlos eine Frage an die Mitglieder stellen:


Ähnliche Themen:


Suche in allen vorhandenen Beiträgen: