|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Hard question about outlook stationeryHi Guys,
I have created my own email stationery in Outlook for my company to use. It works when composing a new email in OUtlook. However, I have an Access 2003 Database in which we send reports via email. I have a VBA code in Access that opens Outlook in a new composition window. When the Outlook window opens, it is a very basic stripped down version of the one I get when from inside Outlook App. I cannot include stationnery in this composition window. Does anyone know how to "program" this into VBA? Or does anyone know how to get the "deluxe" composition window? I hope I am making myself clear? Thanks for any assistance, You apparenly are using methods that invoke Simple MAPI. If you want OUtlook
functionality, then you need to invoke Outlook directly by instantiating an Outlook.Application object and using its objects and methods, e.g. Application.CreateItem to create a new mail message. -- Show quoteHide quoteSue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "dp" <d*@discussions.microsoft.com> wrote in message news:DA4ECD93-A369-480C-B103-CA05DFC7431B@microsoft.com... > Hi Guys, > > I have created my own email stationery in Outlook for my company to use. > It > works when composing a new email in OUtlook. > > However, I have an Access 2003 Database in which we send reports via > email. > I have a VBA code in Access that opens Outlook in a new composition > window. > > When the Outlook window opens, it is a very basic stripped down version of > the one I get when from inside Outlook App. I cannot include stationnery > in > this composition window. > > Does anyone know how to "program" this into VBA? Or does anyone know how > to > get the "deluxe" composition window? > > I hope I am making myself clear? > > Thanks for any assistance, > > Sue:
Thanks for responding. I think I am using the Outlook objects. (Library 9.0) Here is a snippet of code Dim appOutLook As Outlook.Application Dim MailOutlook As Outlook.MailItem Dim objOutlookRecip As Outlook.Recipient, sBodyText As String Set appOutLook = CreateObject("Outlook.Application") Set MailOutlook = appOutLook.CreateItem(olMailItem) With MailOutlook If sEmailAddress <> "" Then Set objOutlookRecip = .Recipients.Add(sEmailAddress) objOutlookRecip.Type = olTo ' Resolve each Recipient's name. For Each objOutlookRecip In .Recipients objOutlookRecip.Resolve Next .... If Not IsMissing(sSelectedFile) Then .Attachments.Add sSelectedFile, olByValue, 1, Dir(sSelectedFile) End If .Display etc. Is this what you mean? Ya, i know that when you call the mailto method in an html hyperlink I get this same composition window. I hate this. Any further suggestions? Thanks, David Show quoteHide quote "Sue Mosher [MVP-Outlook]" wrote: > You apparenly are using methods that invoke Simple MAPI. If you want OUtlook > functionality, then you need to invoke Outlook directly by instantiating an > Outlook.Application object and using its objects and methods, e.g. > Application.CreateItem to create a new mail message. > > -- > Sue Mosher, Outlook MVP > Author of > Microsoft Outlook Programming - Jumpstart for > Administrators, Power Users, and Developers > http://www.outlookcode.com/jumpstart.aspx > > > "dp" <d*@discussions.microsoft.com> wrote in message > news:DA4ECD93-A369-480C-B103-CA05DFC7431B@microsoft.com... > > Hi Guys, > > > > I have created my own email stationery in Outlook for my company to use. > > It > > works when composing a new email in OUtlook. > > > > However, I have an Access 2003 Database in which we send reports via > > email. > > I have a VBA code in Access that opens Outlook in a new composition > > window. > > > > When the Outlook window opens, it is a very basic stripped down version of > > the one I get when from inside Outlook App. I cannot include stationnery > > in > > this composition window. > > > > Does anyone know how to "program" this into VBA? Or does anyone know how > > to > > get the "deluxe" composition window? > > > > I hope I am making myself clear? > > > > Thanks for any assistance, > > > > > > > Yes, you are indeed using Outlook objects and should get the normal Outlook
mail composition window, not the Simple MAPI, window, when you display the item. You always have the option of setting the MailItem.HTMLBody property to the fully tagged HTML for your stationery. Making embedded images work would take a bit more effort and some CDO code. -- Show quoteHide quoteSue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "dp" <d*@discussions.microsoft.com> wrote in message news:26E0B71F-A541-4728-B682-188D81006230@microsoft.com... > Sue: > > Thanks for responding. I think I am using the Outlook objects. (Library > 9.0) > > Here is a snippet of code > > Dim appOutLook As Outlook.Application > Dim MailOutlook As Outlook.MailItem > Dim objOutlookRecip As Outlook.Recipient, sBodyText As String > Set appOutLook = CreateObject("Outlook.Application") > Set MailOutlook = appOutLook.CreateItem(olMailItem) > > With MailOutlook > If sEmailAddress <> "" Then > > Set objOutlookRecip = .Recipients.Add(sEmailAddress) > objOutlookRecip.Type = olTo > > ' Resolve each Recipient's name. > For Each objOutlookRecip In .Recipients > objOutlookRecip.Resolve > Next > ... > > If Not IsMissing(sSelectedFile) Then > .Attachments.Add sSelectedFile, olByValue, 1, > Dir(sSelectedFile) > End If > .Display > > etc. > > Is this what you mean? > > Ya, i know that when you call the mailto method in an html hyperlink I > get > this same composition window. I hate this. > >> > >> > I have created my own email stationery in Outlook for my company to >> > use. >> > It >> > works when composing a new email in OUtlook. >> > >> > However, I have an Access 2003 Database in which we send reports via >> > email. >> > I have a VBA code in Access that opens Outlook in a new composition >> > window. >> > >> > When the Outlook window opens, it is a very basic stripped down version >> > of >> > the one I get when from inside Outlook App. I cannot include >> > stationnery >> > in >> > this composition window. >> > >> > Does anyone know how to "program" this into VBA? Or does anyone know >> > how >> > to >> > get the "deluxe" composition window? >> > >> > I hope I am making myself clear? >> > >> > Thanks for any assistance,
Other interesting topics
Reading text from Email
unexpected behaviour: mailitem.save and attachment Prevent attachments for being inserted into the body How to send meeting request from ASP .NET using VB Remove Personal folder in Folder list POP3/IMAP password encoding Better Notification for Outgoing mail... how to set up account protection for Outlook 2003? Copy selected text and hook into right-click menus should be an easy one |
|||||||||||||||||||||||