» Willkommen auf Software «

Itchigo1987
offline


OC Profi
18 Jahre dabei !


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

Beiträge gesamt: 731 | Durchschnitt: 0 Postings pro Tag
Registrierung: Jan. 2007 | Dabei seit: 6585 Tagen | Erstellt: 15:43 am 19. April 2007
Itchigo1987
offline


OC Profi
18 Jahre dabei !


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

Beiträge gesamt: 731 | Durchschnitt: 0 Postings pro Tag
Registrierung: Jan. 2007 | Dabei seit: 6585 Tagen | Erstellt: 11:30 am 20. April 2007