ich habe eine Tabelle, mit vielen Tabellenblaettern. Meine erste Tabelle ist mein Hauptmenu, dort ist ein Schalter platziert und wenn ich diesen druecke gelange ich sofort zu Outlook. Funktioniert auch super.
So weit so gut!
Nun habe ich den Auftrag erhalten, das wenn ich diesen Schalter betaetige, auch sofort die ganze Tabelle als Attachment eingefuegt wird.
Wie kann ich das realisieren?
Das ist mein Code:
Private Sub CommandButton9_Click()
Dim ool As Variant, oInspector As Variant, oMail As Variant
Dim myattachments As Variant, MyAnsw As String
On Error Resume Next
Set ool = Nothing
Set oInspector = Nothing
Set oMail = Nothing
Set ool = CreateObject("Outlook.Application")
Set oMail = ool.CreateItem(0)
Set myattachments = oMail.Attachments
With oMail
.To = ""
.Subject = ""
.htmlbody = ""
.myattachments.Add ""
.display
End With
End Sub
Ich bedanke mich im voraus schon mal fuer EURE Hilfe.
Petra