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

Syntax error in a print-1st-page macro



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 27th 07, 05:19 PM posted to microsoft.public.outlook.program_vba
Julio De Icaza
external usenet poster
 
Posts: 1
Default Syntax error in a print-1st-page macro

Hello coding guys,

I'm new to this but think is a easy deal: Create a macro to print the first
page of an opened email message, using the following procedure.

Application.ActiveWindow MailItem.PrintOut Pages:="1"

Please bring me a solution for the "Compile error: Syntax error" received.
Seasons greetings,
  #2  
Old December 27th 07, 07:33 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Syntax error in a print-1st-page macro

The error is coming up because there is no such command or set of arguments
in Outlook. You can only print an entire item. You'd have to export the text
of the item into an application such as Word and use Word's printing methods
to do what you want. Outlook has very primitive printing functionality.

--
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


"Julio De Icaza" wrote in message
...
Hello coding guys,

I'm new to this but think is a easy deal: Create a macro to print the
first
page of an opened email message, using the following procedure.

Application.ActiveWindow MailItem.PrintOut Pages:="1"

Please bring me a solution for the "Compile error: Syntax error" received.
Seasons greetings,


 




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
someone can help me to correct my syntax and my all Macro פקודת מאקרו בערבית Outlook and VBA 1 December 23rd 07 10:28 PM
Error Message: Invalid DN Syntax rhody Outlook - Using Contacts 1 September 23rd 06 09:15 PM
Invalid syntax error on some URL links in OE Alan J Robertson Outlook Express 28 April 1st 06 04:45 PM
Invalid Syntax Error?? F. Edwin Felty Outlook Express 5 March 31st 06 05:02 PM
e mails returned 501 syntax error in parameters.outlook please res krisa and mike Outlook - Installation 1 January 10th 06 06:49 PM


All times are GMT +1. The time now is 10:17 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.