outlook stationary

Joined
Sep 17, 2007
Messages
3
Reaction score
0
Try



Dim application As New Microsoft.Office.Interop.Outlook.Application

Dim mailItem1 As Microsoft.Office.Interop.Outlook.MailItem = _

TryCast(application.CreateItem( _

Microsoft.Office.Interop.Outlook.OlItemType.olMailItem), _

Microsoft.Office.Interop.Outlook.MailItem)



Dim doc As Microsoft.Office.Interop.Word.Document = CType _

(mailItem1.GetInspector.WordEditor, Microsoft.Office.Interop.Word.Document)



Dim ThemeType As String = "C:\Program Files\Common Files\microsoft shared\THEMES12\"



'Dim dlgOpen As New OpenFileDialog

'Dim ThemeName As String

'dlgOpen.Title = "Select a Theme"

'dlgOpen.Filter = "Outlook Files (*.INF|*.INF|" & "All files|*.*"



'If dlgOpen.ShowDialog = Windows.Forms.DialogResult.OK Then

' ThemeName = dlgOpen.FileName



mailItem1.To = txt_email.Text

mailItem1.Subject = cmb_enquiry.SelectedText & "Enquiry"

mailItem1.Body = txt_enquiryhelper.Text



doc.ApplyTheme(txt_notes.Text)

'doc.ApplyTheme(ThemeType)

'doc.ApplyTheme("IRIS")



mailItem1.Display()



'End If



Catch ex As SystemException

MessageBox.Show("OutLook Error", "ConnectChildCare", MessageBoxButtons.OK)

End Try



My problem is I cannot seem to attach a stationary to an email I generate.



Originally I was confused because I thought themes & stationary where the same but they are slightly different.

I have managed to attach a theme but I cannot figure out why I cannot attach a stationary.



 
Back
Top