Home All Groups Group Topic Archive Search About

Hard question about outlook stationery

Author
14 Feb 2005 10:55 PM
dp
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,

Author
14 Feb 2005 11:12 PM
Sue Mosher [MVP-Outlook]
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


Show quoteHide quote
"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,
>
>
Are all your drivers up to date? click for free checkup

Author
14 Feb 2005 11:25 PM
dp
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,
> >
> >
>
>
>
Author
14 Feb 2005 11:36 PM
Sue Mosher [MVP-Outlook]
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.

--
Sue Mosher, Outlook MVP
Author of
     Microsoft Outlook Programming - Jumpstart for
     Administrators, Power Users, and Developers
     http://www.outlookcode.com/jumpstart.aspx


Show quoteHide quote
"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,

Bookmark and Share