![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
How can i print the text contained in a label in a form?
Thanks |
Ads |
#2
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |