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
 
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
 
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
 
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.
Similar threads
Thread starter Title Forum Replies Date
Victor_50 Problem - Google Workspace will stop "unsafe" access to Outlook end 2024 Using Outlook 3
richardwing Outlook 365 VBA to access "Other Actions" menu for incoming emails in outlook Outlook VBA and Custom Forms 0
G How to add a folder shortcut to outlook quick access toolbar? Using Outlook 6
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 Using Outlook 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 Unable to access public folders in Outlook 2007 on Exchange 2010. OWA PF works fine Using Outlook 7
R Proof Of Looping Bug in Reading Outlook Inbox From Access? Outlook VBA and Custom Forms 2
R Access Program Only Looping Part Way Through Outlook Inbox Outlook VBA and Custom Forms 2
H Exporting Outlook Forms to Access or Excel Outlook VBA and Custom Forms 2
P Access - Outlook Outlook VBA and Custom Forms 2
E Redemption access AppointmentItem Label from outlook Outlook VBA and Custom Forms 6
R Outlook and Access integration using VBA Outlook VBA and Custom Forms 1
K Outlook admin vs individual access (VBA pulling info) Outlook VBA and Custom Forms 1
S Sending Email from Access 2007 through Outlook 2007 using template Outlook VBA and Custom Forms 13
D Outlook 2003 - A program is trying to access e-mail addresses Outlook VBA and Custom Forms 5
G Linking Outlook to Access for Contacts in Access Outlook VBA and Custom Forms 3
R Programming Web Outlook Access Outlook VBA and Custom Forms 3

Similar threads

Back
Top