A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Printing



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 27th 08, 09:58 PM posted to microsoft.public.outlook.program_vba
Pierre Scerri
external usenet poster
 
Posts: 23
Default Printing

How can i print the text contained in a label in a form?

Thanks
Ads
  #2  
Old February 27th 08, 10:41 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Printing

See http://www.outlookcode.com/article.aspx?id=24 for various solutions to the limitation that Outlook forms don't support WYSIWYG printing. The Word template technique is the most flexible and highly recommended.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Pierre Scerri" wrote in message ...
How can i print the text contained in a label in a form?

Thanks

  #3  
Old February 28th 08, 01:43 PM posted to microsoft.public.outlook.program_vba
Pierre Scerri
external usenet poster
 
Posts: 23
Default Printing

Thanks for the info. But this is too complicated a way to do it. It would
involve other users having to install the add-in.

All i need is a simple text print. It does not have to show the dialog box
just the text in plain ASCII. The text contains more than one line. Is
there any way that i can send it straight to a printer?

Thanks.

"Sue Mosher [MVP-Outlook]" wrote:

See http://www.outlookcode.com/article.aspx?id=24 for various solutions to the limitation that Outlook forms don't support WYSIWYG printing. The Word template technique is the most flexible and highly recommended.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Pierre Scerri" wrote in message ...
How can i print the text contained in a label in a form?

Thanks


  #4  
Old February 28th 08, 02:00 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Printing

Add-in? Word can be automated from VBScript behind a custom form just fine, even if you can't distribute a Word template.

An alternative would be to build a new Outlook item, include the desired content in the Body property, then call that item's PrintOut method. That can all be done within VBScript or VBA.

Still another would be to create a text file using FileSystemObject methods and then print that file using code like this ( from http://groups.google.com/group/micro...e5a1c85015f3):

strFile = "test.txt"
strFolder = "C:\temp"
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(strFolder)
objFolder.ParseName(strFile).InvokeVerb("print")

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Pierre Scerri" wrote in message ...
Thanks for the info. But this is too complicated a way to do it. It would
involve other users having to install the add-in.

All i need is a simple text print. It does not have to show the dialog box
just the text in plain ASCII. The text contains more than one line. Is
there any way that i can send it straight to a printer?

Thanks.

"Sue Mosher [MVP-Outlook]" wrote:

See http://www.outlookcode.com/article.aspx?id=24 for various solutions to the limitation that Outlook forms don't support WYSIWYG printing. The Word template technique is the most flexible and highly recommended.

"Pierre Scerri" wrote in message ...
How can i print the text contained in a label in a form?

Thanks


  #5  
Old February 28th 08, 03:09 PM posted to microsoft.public.outlook.program_vba
Pierre Scerri
external usenet poster
 
Posts: 23
Default Printing

That's exactly what i was looking for. I'll give it a try.

Thanks

PS Sorry about the add-in. Must have misread something.



"Sue Mosher [MVP-Outlook]" wrote:

Add-in? Word can be automated from VBScript behind a custom form just fine, even if you can't distribute a Word template.

An alternative would be to build a new Outlook item, include the desired content in the Body property, then call that item's PrintOut method. That can all be done within VBScript or VBA.

Still another would be to create a text file using FileSystemObject methods and then print that file using code like this ( from http://groups.google.com/group/micro...e5a1c85015f3):

strFile = "test.txt"
strFolder = "C:\temp"
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(strFolder)
objFolder.ParseName(strFile).InvokeVerb("print")

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Pierre Scerri" wrote in message ...
Thanks for the info. But this is too complicated a way to do it. It would
involve other users having to install the add-in.

All i need is a simple text print. It does not have to show the dialog box
just the text in plain ASCII. The text contains more than one line. Is
there any way that i can send it straight to a printer?

Thanks.

"Sue Mosher [MVP-Outlook]" wrote:

See http://www.outlookcode.com/article.aspx?id=24 for various solutions to the limitation that Outlook forms don't support WYSIWYG printing. The Word template technique is the most flexible and highly recommended.

"Pierre Scerri" wrote in message ...
How can i print the text contained in a label in a form?

Thanks


  #6  
Old March 7th 08, 08:47 AM posted to microsoft.public.outlook.program_vba
Pierre Scerri
external usenet poster
 
Posts: 23
Default Printing

After your suggestions i started trying things out and came up with this:

Set myOlApp = CreateObject("Outlook.Application")
Set myitem = myOlApp.CreateItem(olNoteItem)
myitem.Body = LblView.Caption
myitem.PrintOut

That works well except that i need to change the font size to simulate
Tools|Options|Note Options...

Can i do this through VBA?

Thanks

"Pierre Scerri" wrote:

That's exactly what i was looking for. I'll give it a try.

Thanks

PS Sorry about the add-in. Must have misread something.



"Sue Mosher [MVP-Outlook]" wrote:

Add-in? Word can be automated from VBScript behind a custom form just fine, even if you can't distribute a Word template.

An alternative would be to build a new Outlook item, include the desired content in the Body property, then call that item's PrintOut method. That can all be done within VBScript or VBA.

Still another would be to create a text file using FileSystemObject methods and then print that file using code like this ( from http://groups.google.com/group/micro...e5a1c85015f3):

strFile = "test.txt"
strFolder = "C:\temp"
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(strFolder)
objFolder.ParseName(strFile).InvokeVerb("print")

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Pierre Scerri" wrote in message ...
Thanks for the info. But this is too complicated a way to do it. It would
involve other users having to install the add-in.

All i need is a simple text print. It does not have to show the dialog box
just the text in plain ASCII. The text contains more than one line. Is
there any way that i can send it straight to a printer?

Thanks.

"Sue Mosher [MVP-Outlook]" wrote:

See http://www.outlookcode.com/article.aspx?id=24 for various solutions to the limitation that Outlook forms don't support WYSIWYG printing. The Word template technique is the most flexible and highly recommended.

"Pierre Scerri" wrote in message ...
How can i print the text contained in a label in a form?

Thanks


  #7  
Old March 7th 08, 01:24 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Printing

No, individual note items do not have any formatting of their own. The font is controlled by the Tools | Options setting, which is held in the Windows registry, not controlled by the Outlook object model.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Pierre Scerri" wrote in message ...
After your suggestions i started trying things out and came up with this:

Set myOlApp = CreateObject("Outlook.Application")
Set myitem = myOlApp.CreateItem(olNoteItem)
myitem.Body = LblView.Caption
myitem.PrintOut

That works well except that i need to change the font size to simulate
Tools|Options|Note Options...

Can i do this through VBA?


"Sue Mosher [MVP-Outlook]" wrote:

Add-in? Word can be automated from VBScript behind a custom form just fine, even if you can't distribute a Word template.

An alternative would be to build a new Outlook item, include the desired content in the Body property, then call that item's PrintOut method. That can all be done within VBScript or VBA.

Still another would be to create a text file using FileSystemObject methods and then print that file using code like this ( from http://groups.google.com/group/micro...e5a1c85015f3):

strFile = "test.txt"
strFolder = "C:\temp"
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(strFolder)
objFolder.ParseName(strFile).InvokeVerb("print")

"Pierre Scerri" wrote in message ...
Thanks for the info. But this is too complicated a way to do it. It would
involve other users having to install the add-in.

All i need is a simple text print. It does not have to show the dialog box
just the text in plain ASCII. The text contains more than one line. Is
there any way that i can send it straight to a printer?

Thanks.

"Sue Mosher [MVP-Outlook]" wrote:

See http://www.outlookcode.com/article.aspx?id=24 for various solutions to the limitation that Outlook forms don't support WYSIWYG printing. The Word template technique is the most flexible and highly recommended.

"Pierre Scerri" wrote in message ...
How can i print the text contained in a label in a form?

Thanks


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing Steve Martin Outlook - Using Contacts 1 July 20th 07 11:51 AM
Printing from OE6 Win Tandy Outlook Express 6 June 28th 07 10:45 AM
Printing From CPA andycruce Outlook - Calandaring 0 March 28th 07 02:51 AM
printing Joel Allen Outlook and VBA 3 August 12th 06 06:47 PM
Monthly calendar + printing--O2000 // printing end time ? philmail Outlook - Calandaring 0 June 6th 06 02:01 PM


All times are GMT +1. The time now is 10:58 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.