PC Review


Reply
Thread Tools Rate Thread

Access Outlook's Page Header and Footer

 
 
amh
Guest
Posts: n/a
 
      28th Jul 2009

I have a requirement to have specific data that's stored in a use
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/Foote
in the overall Outlook Page Setup, but I can't access those through th
inspector. Can this be done?

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

Any help is appreciated


--
amh
 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      29th Jul 2009
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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"amh" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> 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


 
Reply With Quote
 
amh
Guest
Posts: n/a
 
      30th Jul 2009

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

How do I get the email content, including the to, from and subject t
copy over to a word document? Right now I can get the text of th
email by using the mailitem.body and I can write what I need to th
word headers and footers but I'm missing how to get the email heade
info. I know I can get the recipients, subject, etc. one by one but i
there a way to get the whole thing as one, or is there a method that
missing that will render the email and then I can copy and insert int
word?

'Ken Slovak - [MVP - Outlook Wrote:
> ;316619']I think to do what you want you will need to print to Word o
> some other
> application that provides access to print setup and headers an
> footers.
> Outlook doesn't provide any of that.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007.
> Reminder Manager, Extended Reminders, Attachment Options.
> http://www.slovaktech.com/products.htm
>
>
> "amh" (E-Mail Removed) wrote in message
> news:(E-Mail Removed)...-
>
> 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 th
> Header/Footer
> in the overall Outlook Page Setup, but I can't access those throug
> 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
 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      30th Jul 2009
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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"amh" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> 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?


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to remove page footer from specific group header page =?Utf-8?B?Q1Q=?= Microsoft Access Reports 2 23rd Jan 2007 12:17 AM
Re: Can section page 3's be in header and document page #'s in footer Jezebel Microsoft Word Document Management 0 11th Jan 2007 08:33 PM
RE: HOW DO I NOT PRINT PAGE FOOTER ON A GROUP HEADER PAGE? =?Utf-8?B?RHVhbmUgSG9va29t?= Microsoft Access Reports 2 30th Dec 2006 03:33 AM
last page header and footer Hilary Microsoft Word Document Management 1 29th Jan 2004 07:03 PM
Header, footer, page set-up Kimba Microsoft Excel Misc 1 4th Dec 2003 10:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:40 PM.