How to get subject from template.oft-File?

H

Helmut Weber

Hi all,
i'm generating mass-emails (no spam) programmatically
by using templates (*.oft). This works great, yet it's
been impossible so far, to get the text of subject
from template to appear as the actual mail subject.
Any ideas?
Here is my part of my code (lotus-script), but
not that different from VBA:.
Set oOutlookApp = GetObject(, "Outlook.Application")
Set OItem = oOutlookApp.CreateItemFromTemplate(aTemplate)
' no problem here
With oItem
..To = ' no problem here
..subject = "Testmailing" !!!!
'I want the subject from the template
..body = ' no problem here
..send
End With
 
S

Sue Mosher [MVP]

Dumb question, but did you actually set a value for the Subject before you
saved the .oft file? If the template has a subject, that's what will appear
as the mail message subject.
 
K

Ken Slovak - [MVP - Outlook]

If the template was saved with a subject it should have it when you
create the new item from the template.
 
H

Helmut Weber

Thank you,
there went something wrong with saving the template.
Greetings from bavaria
Helmut Weber
 
Top