Access Outlook's Page Header and Footer

Status
Not open for further replies.
A

amh

I have a requirement to have specific data that's stored in a user

property be displayed in the header and footer for printing purposes.

The only way I can think of doing this is by setting the Header/Footer

in the overall Outlook Page Setup, but I can't access those through the

inspector. Can this be done?

I know that if I'm able to do this via code, it will apply to all

emails but I'm hoping to blank it out after the email is printed.

Any help is appreciated.

amh
 
K

Ken Slovak - [MVP - Outlook]

I think to do what you want you will need to print to Word or some other

application that provides access to print setup and headers and footers.

Outlook doesn't provide any of that.

"amh" <amh.4b520bd@outlookbanter.com> wrote in message

news:amh.4b520bd@outlookbanter.com...

> I have a requirement to have specific data that's stored in a user
> property be displayed in the header and footer for printing purposes.

> The only way I can think of doing this is by setting the Header/Footer
> in the overall Outlook Page Setup, but I can't access those through the
> inspector. Can this be done?

> I know that if I'm able to do this via code, it will apply to all
> emails but I'm hoping to blank it out after the email is printed.

> Any help is appreciated.

> > amh
 
A

amh

That's a good idea to print using word - thanks. The only problem I'm

running into now is that I want it to look as close as possible to how

it looks if I print from outlook.

How do I get the email content, including the to, from and subject to

copy over to a word document? Right now I can get the text of the

email by using the mailitem.body and I can write what I need to the

word headers and footers but I'm missing how to get the email header

info. I know I can get the recipients, subject, etc. one by one but is

there a way to get the whole thing as one, or is there a method that I

missing that will render the email and then I can copy and insert into

word?

' - [MVP - Outlook Wrote:
> ;316619']I think to do what you want you will need to print to Word or
> some other
> application that provides access to print setup and headers and
> footers.
> Outlook doesn't provide any of that.

> >

>

> "amh" amh.4b520bd@outlookbanter.com wrote in message
> news:amh.4b520bd@outlookbanter.com...-

> I have a requirement to have specific data that's stored in a user
> property be displayed in the header and footer for printing purposes.

> The only way I can think of doing this is by setting the
> Header/Footer
> in the overall Outlook Page Setup, but I can't access those through
> the
> inspector. Can this be done?

> I know that if I'm able to do this via code, it will apply to all
> emails but I'm hoping to blank it out after the email is printed.

> Any help is appreciated.

> > amh -


amh
 
K

Ken Slovak - [MVP - Outlook]

You'd need to extract everything you want such as item.Subject, item.To,

etc. If you intend to do this often you probably should design a Word

template and open that to fill in bookmarks or fields with the data from

Outlook. That way you get a consistent look to the output. There isn't any

method that will do any rendering for you, just use of the Word object

model.

Internet mail headers aren't exposed in the Outlook object model, even in

Outlook 2007. For Outlook 2007 you could use the item.PropertyAccessor

object with the DASL property tag

"http://schemas.microsoft.com/mapi/proptag/0x007D001E" (a DASL tag, not an

URL) to get the entire header property (PR_TRANSPORT_MESSAGE_HEADERS) as a

string, but you'd need to parse each line of that string to extract

individual headers.

In earlier versions of Outlook where PropertyAccessor isn't available you'd

have to use a different API such as Extended MAPI (C++ or Delphi, unmanaged

code only) or CDO 1.21 (optional installation and subject to security) or

Redemption (www.dimastr.com/redemption) to get the Internet headers.

"amh" <amh.4b76f5e@outlookbanter.com> wrote in message

news:amh.4b76f5e@outlookbanter.com...

> That's a good idea to print using word - thanks. The only problem I'm
> running into now is that I want it to look as close as possible to how
> it looks if I print from outlook.

> How do I get the email content, including the to, from and subject to
> copy over to a word document? Right now I can get the text of the
> email by using the mailitem.body and I can write what I need to the
> word headers and footers but I'm missing how to get the email header
> info. I know I can get the recipients, subject, etc. one by one but is
> there a way to get the whole thing as one, or is there a method that I
> missing that will render the email and then I can copy and insert into
> word?
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
H Add login page to outlook web access 2007 Using Outlook 1
T Render Outlook emails in MS access as they appear in Outlook Outlook VBA and Custom Forms 2
T Outlook "A program is trying to access Outlook" Using Outlook 3
R How can I access my emails from corrupt offline files of MS Outlook ? Using Outlook 1
J Open an outlook email by Subject on MS Access linked table with VBA Outlook VBA and Custom Forms 10
O Synchronize safe persons Outlook 2016 -> Outlook Web Access (OWA) Using Outlook 30
K How to access emails found to be located in "Top of Outlook data file"? Using Outlook 3
O Outlook Web Access - how to disable spam filter Using Outlook 6
F Outlook 2016 bulk email from access Outlook VBA and Custom Forms 3
G Can't open .pst. Message could not access default folder (Outlook 2010 (.pst). Before that was backi Using Outlook 0
D Creating an outlook session from Access vba but run silently. With A specific profile Outlook VBA and Custom Forms 1
T Cannot access outlook.com accounts in Outlook 2016 Using Outlook 1
B Can't expose sender email address when linking outlook to access Using Outlook 3
Diane Poremsky Change Outlook's Programmatic Access Options New Slipstick.com Articles 0
G Adding a contact to Outlook with a custom form using Access VBA Outlook VBA and Custom Forms 1
C Merging Word and Access into Outlook Using Outlook 4
I Outlook 2016 and Slow access to Outlook.com IMAP Using Outlook 0
B No permission to access Outlook.pst file Using Outlook 1
Norbert VBA Flag that would indicate the email was sent from Outlook to Access. Outlook VBA and Custom Forms 2
U Cannot access fields at bottom of Outlook 2013 Contact Rec. Using Outlook 1
A Synchronize Access Table with Outlook Calendar Appointments Outlook VBA and Custom Forms 3
L Outlook Data Files command not working in the quick access bar Using Outlook 1
Hudas Hyperlink Saved Outlook Email to MS Access Table Using Outlook 4
Hudas Import Outlook Emails(Inbox) to MS Access as Attachment Using Outlook 1
M How do I access a contact list subfolder in Outlook 2013? Using Outlook 5
K how to Access Outlook Contact Properties Using Outlook 1
M Outlook client macro to web access Using Outlook 1
M Access replicated Outlook (email folders, calendar, contacts, notes) via web Using Outlook 1
R Limiting Outlook Access to Inside Network Only Exchange Server Administration 1
J Outlook and owa access Using Outlook 1
O Can't create new email or access email acounts Outlook 2003 Using Outlook 1
C MAPI to access a 64 bit Outlook from a 32 bit application; or access via ODBC Using Outlook 0
C Synchronize outlook with access Using Outlook 1
A Allow Programmatic Access Outlook 2010 Using Outlook 3
M open outlook calendar from an access form Using Outlook 4
M open outlook contacts in access 2007 form Using Outlook 1
J A program is trying to access e-mail address you have stored in Outlook. Do you want to allow this. Using Outlook 2
R Shared Inbox Outlook 2010 - one client cannot access Exchange Server Administration 1
L Outlook Web Access Using Outlook 2
G Disable Outlook Web Access Password Expiry Notification Banner Using Outlook 4
P Outlook Crashed. Unable to Access E-Mail Older Than Monday Using Outlook 2
C cannot access hyperlink in Outlook 2007 Using Outlook 1
T How can I send e-mail from an Access 2010 application using Outlook not CDO Using Outlook 1
M Outlook 2010 can not access Out of office Exchange Server Administration 2
S Outlook 2007 suddenly can't access my Gmail accounts Using Outlook 2
P How do I access my address book lists in Outlook 2010 so that I can send e mails to group members Using Outlook 1
T Cannot start Microsoft Outlook... Cannot access file... Using Outlook 2
V Launching Access export from Outlook task, Access Password pop-up window gets lost Using Outlook 1
A I have purchased a replacement computer and installed Outlook 2010. My server is a 2003 small business exchange server. How can I access the calenda Using Outlook 1
A Why isn't outlook working with the access data collection email form? Using Outlook 1
Similar threads


















































Top