How to disable printing custom fields.

D

Deva

Hi,
I have created a custom field and stored the custom field
along with MailItem. But when user prints the email,
custom field is also coming along with that. Is there
anyway I can disable printing the custom fields.
I also like to know is there anyway to get a handle when
outlook starts and quits. I need to start my application
when outlook starts and quit when it quits.
Eagerly looking forward your reply.

Thanks in advance..

Thanks,
Deva
 
H

Hollis D. Paul

I have created a custom field and stored the custom field
along with MailItem. But when user prints the email,
custom field is also coming along with that. Is there
anyway I can disable printing the custom fields.
I also like to know is there anyway to get a handle when
outlook starts and quits. I need to start my application
when outlook starts and quit when it quits.
Eagerly looking forward your reply.
There is usually a property on the field that says something like
include this field for printing. Make sure it is unchecked.

You can control how printing is done if you use Word and its Object
Model to control when it is opened and when it is closed. You do not
say which version of Outlook you are using, but since Ol2000, you have
an Application-level events for Outlook start-up and shut-down within
the VBA project. You can use them to start and close the Word
application.

Hollis D. Paul [MVP - Outlook]
(e-mail address removed)
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2195
http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US

Mukilteo, WA USA
 
D

deva

Hi,
Thanks for replying.
I have created custom fields through program, here is the
sample program..
Set objOutlook = CreateObject("Outlook.Application")
Set objMailItem = objOutlook.CreateItem(olMailItem)
objMailItem.Display

objMailItem.UserProperties.Add "Deva", olText, False
objMailItem.UserProperties.Item("Deva").Value = ""
objMailItem.Save
Print is the print option in Outlook. I'm not doing
anything new here. But that print option prints my
customfield along with it.
Is there anyway i can disable that through program.

I have written an VB service which should start as soon
as Outlook is started and should shutdown as soon as it
shuts down.
I cannot write into VBAProject.otm file because probably
other application might have used or somebody would not
allow macro.
Is there any other outside the outlook to see whether
outlook is started and ended.Some registry entries,
etc..etc..

Looking forward your reply.

Thanks,
Deva

-----Original Message-----
I have created a custom field and stored the custom field
along with MailItem. But when user prints the email,
custom field is also coming along with that. Is there
anyway I can disable printing the custom fields.
I also like to know is there anyway to get a handle when
outlook starts and quits. I need to start my application
when outlook starts and quit when it quits.
Eagerly looking forward your reply.
There is usually a property on the field that says something like
include this field for printing. Make sure it is unchecked.

You can control how printing is done if you use Word and its Object
Model to control when it is opened and when it is closed. You do not
say which version of Outlook you are using, but since Ol2000, you have
an Application-level events for Outlook start-up and shut- down within
the VBA project. You can use them to start and close the Word
application.

Hollis D. Paul [MVP - Outlook]
(e-mail address removed)
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2195
http://search.support.microsoft.com/kb/c.asp? FR=0&SD=TECH&LN=EN-US

Mukilteo, WA USA


.
 
H

Hollis D. Paul

Set objOutlook = CreateObject("Outlook.Application")
Set objMailItem = objOutlook.CreateItem(olMailItem)
objMailItem.Display

objMailItem.UserProperties.Add "Deva", olText, False
objMailItem.UserProperties.Item("Deva").Value = ""
objMailItem.Save
Pardon me for being blunt, but creating a custom form this way, on the
fly, is really dumb. It is the kind of thing one shows neophytes when
giving easily interpretable exercises in how to code up a mail item
using the OOM. However, it shouldn't be done in production.

You should really create a custom form, which the data property defined
in the custom form, then create the new mail item using the additem
method of the Inbox, calling out the custom form name. You are then
able to exclude the property from the print cycle.

Hollis D. Paul [MVP - Outlook]
(e-mail address removed)
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2195
http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US

Mukilteo, WA USA
 
H

Hollis D. Paul

I cannot write into VBAProject.otm file because probably
other application might have used or somebody would not
allow macro.
Is there any other outside the outlook to see whether
outlook is started and ended.Some registry entries,
etc..etc..
The best way to solve this situation is to write the code as a Word
template. Word has a very flexible way of adding VBA code to a
project, has start and stop events, and can create the Outlook
application using the same code you have above.

Hollis D. Paul [MVP - Outlook]
(e-mail address removed)
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2195
http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US

Mukilteo, WA USA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top