Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default changing printer.papersize=vbPRPSLetter


Dear All,

Iam opening an excel file through visualbasic6.0 code with some data
iam filling in the excel file.everything is ok but i want to change the
printer papersize A4 to Letter.
iam setting to Printer.papersize=vbPRPSLetter for Letter in the visual
basic code.

but it is not setting to Printer.papersize =vbPRPSLetter

please helpme on this regard...

Thanks a lot !!!
Amar...


--
areddy
------------------------------------------------------------------------
areddy's Profile: http://www.excelforum.com/member.php...o&userid=28204
View this thread: http://www.excelforum.com/showthread...hreadid=494796

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default changing printer.papersize=vbPRPSLetter

areddy,
You are making changes to the Printer object that VB would use. But you are
printing through Excel, I suppose.
So you need to use the .PageSetUp.PaperSize of the worksheet to print to
make such changes.
e.g. Worksheets("Sheet1").PageSetup.PaperSize = xlPaperLetterLetter

<VBA Help
PaperSize Property
Returns or sets the size of the paper. Read/write Long.
Can be one of the following XlPaperSize constants. (Some printers may not
support all of these paper sizes.)

xlPaperLetter Letter (8-1/2 in. x 11 in.)
.............................
xlPaperFanfoldLegalGerman German Legal Fanfold (8-1/2 in. x 13 in.)
xlPaperUser User-defined
</VBA Help

NickHK

"areddy" wrote in
message ...

Dear All,

Iam opening an excel file through visualbasic6.0 code with some data
iam filling in the excel file.everything is ok but i want to change the
printer papersize A4 to Letter.
iam setting to Printer.papersize=vbPRPSLetter for Letter in the visual
basic code.

but it is not setting to Printer.papersize =vbPRPSLetter

please helpme on this regard...

Thanks a lot !!!
Amar...


--
areddy
------------------------------------------------------------------------
areddy's Profile:

http://www.excelforum.com/member.php...o&userid=28204
View this thread: http://www.excelforum.com/showthread...hreadid=494796



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default changing printer.papersize=vbPRPSLetter


Hi Nick,

thanks for fast responce.now iam getting the result iam able to set the
paper size to xlPaperA4 or xlPaperLetter.

once again thanks for the replay.

Regards,
Amar...


--
areddy
------------------------------------------------------------------------
areddy's Profile: http://www.excelforum.com/member.php...o&userid=28204
View this thread: http://www.excelforum.com/showthread...hreadid=494796

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing printers does not correctly apply printer settings [email protected] Excel Discussion (Misc queries) 0 September 13th 06 08:10 AM
Excel changing Default Printer Brad Excel Programming 1 January 7th 05 04:02 PM
Changing the default printer... Meek Spiffinton Excel Programming 1 November 29th 04 05:21 PM
Changing Excel Object's page setup wthout having a printer installed alijaffer Excel Programming 3 July 27th 04 05:03 PM
CHANGING PRINTER DEFAULTS OLDJAY Excel Programming 1 May 12th 04 09:51 PM


All times are GMT +1. The time now is 03:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"