Access und Outlook

- OCinside.de PC Forum
https://www.ocinside.de

-- Software
https://www.forum-inside.de/forums.cgi?forum=17

--- Access und Outlook
https://www.forum-inside.de/topic.cgi?forum=17&topic=7926

Ein Ausdruck des Beitrags mit 2 Antworten ergibt bei 3 Antworten pro Seite ca. 1 DIN A4 Seiten. Das entspricht bei 80 g/m² ca. 4.99 Gramm Papier.


-- Veröffentlicht durch Itchigo1987 am 11:30 am 20. April 2007

Hab die Lösung gefunden :)
Hier der Quellcode, falls es mal wer braucht.


Private Sub Befehl2_Click()
Dim olApp As Outlook.Application
Dim oItem As Outlook.MailItem

Set olApp = New Outlook.Application
'Vorlage verwenden
Set oItem = olApp.CreateItemFromTemplate("C:\AnfrageAD.oft")
'Neue Email erstellen
'Set oItem = olApp.CreateItem(olMailItem)

With oItem
.To = "Chris.Berger@alsecco.com"
.Subject = "Anfrage Außendienst"
.Display
End With

End Sub





vlg Itchigo


-- Veröffentlicht durch Itchigo1987 am 15:43 am 19. April 2007

Hallo!
Bin beim VBA Programmieren grad auf folgendes Problem gestoßen.
Ich hab mir eine Access Datenbank mit Access 2003 erstellt.
Dann hab ich mir das Outlook Objekt eingebunden, um auf
Outlook zuzugreifen. Das funktioniert auch alles wunderbar. Jetzt
hab ich allerdings das Problem, das ich keine Outlook Vorlage (*.oft)
öffnen kann. Hat jemand ne Ahnung wie das geht???
Hier mein Quelltext.


Private Sub MailsSenden_Click()

Dim olApp As Outlook.Application
Dim oItem As Outlook.MailItem

Set olApp = New Outlook.Application
Set oItem = olApp.CreateItem(olMailItem)

With oItem
.To = "Test.Test@hotmail.com"
.Subject = "Test-Betreff"
.Body = "Hier wäre dann der Text Körper :)"
.Display
End With

End Sub




vlg Itchigo


OCinside.de PC Forum
© 2001 - 2024 www.ocinside.de