dbTalk Databases Forums  

Printing to Custom Size Paper

comp.databases.ms-access comp.databases.ms-access


Discuss Printing to Custom Size Paper in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bob Darlington
 
Posts: n/a

Default Printing to Custom Size Paper - 10-18-2010 , 02:07 AM






I've already explored this through a different 'Subject' line, and received
some helpful replies, but unfortunately I still can't get it to work.
So, my question now is:
Has anybody successfully used code similar to that below to change paper
size to a custom size when printing to specialised forms?

Application.Printer = Application.Printers("Cheque Printer")
DoCmd.OpenReport "rCheque", 2, , "PropNum = " & gblPropNum
Set rpt = Reports!rCheque
With rpt.Printer
.DefaultSize = False
.PaperSize = acPRPSUser
.ItemSizeHeight = 5301
.ItemSizeWidth = 15252
End With

The code runs without generating an error, but invariably opens the report
in 'Letter' paper size.
I have set up a custom paper size called 'Cheque' which I can manually set
and all works fine.
But I need to distribute the app in an mde, so want to change the paper size
when the report is opened as above.
Has anyone got this to work?
--
Bob Darlington
Brisbane

Reply With Quote
  #2  
Old   
Arvin Meyer
 
Posts: n/a

Default Re: Printing to Custom Size Paper - 10-18-2010 , 07:51 AM






I would create a custom Printer object that used this paper size and install
it on each user's machine. Then set the report to that specific printer and
save it.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access Solutions", published by Wiley


"Bob Darlington" <bob (AT) notheredpcman (DOT) com.au> wrote

Quote:
I've already explored this through a different 'Subject' line, and
received some helpful replies, but unfortunately I still can't get it to
work.
So, my question now is:
Has anybody successfully used code similar to that below to change paper
size to a custom size when printing to specialised forms?

Application.Printer = Application.Printers("Cheque Printer")
DoCmd.OpenReport "rCheque", 2, , "PropNum = " & gblPropNum
Set rpt = Reports!rCheque
With rpt.Printer
.DefaultSize = False
.PaperSize = acPRPSUser
.ItemSizeHeight = 5301
.ItemSizeWidth = 15252
End With

The code runs without generating an error, but invariably opens the report
in 'Letter' paper size.
I have set up a custom paper size called 'Cheque' which I can manually set
and all works fine.
But I need to distribute the app in an mde, so want to change the paper
size when the report is opened as above.
Has anyone got this to work?
--
Bob Darlington
Brisbane

Reply With Quote
  #3  
Old   
Bob Darlington
 
Posts: n/a

Default Re: Printing to Custom Size Paper - 10-18-2010 , 06:18 PM



Thanks Arvin,
That is what I've got at the moment.
But whenever the users open the report in the mde, the paper size is set to
'Letter'.
I've been using TS to load the program as an mdb, selecting the 'Cheque'
paper size and creating the mde remotely.
It works, but is a pain in the backside.
BTW, I'm using Access 2002.

--
Bob Darlington
Brisbane
"Arvin Meyer" <arvinm (AT) invalid (DOT) org> wrote

Quote:
I would create a custom Printer object that used this paper size and
install it on each user's machine. Then set the report to that specific
printer and save it.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access Solutions", published by Wiley


"Bob Darlington" <bob (AT) notheredpcman (DOT) com.au> wrote in message
news:4cbbf236$0$25360$afc38c87 (AT) news (DOT) optusnet.com.au...
I've already explored this through a different 'Subject' line, and
received some helpful replies, but unfortunately I still can't get it to
work.
So, my question now is:
Has anybody successfully used code similar to that below to change paper
size to a custom size when printing to specialised forms?

Application.Printer = Application.Printers("Cheque Printer")
DoCmd.OpenReport "rCheque", 2, , "PropNum = " & gblPropNum
Set rpt = Reports!rCheque
With rpt.Printer
.DefaultSize = False
.PaperSize = acPRPSUser
.ItemSizeHeight = 5301
.ItemSizeWidth = 15252
End With

The code runs without generating an error, but invariably opens the
report in 'Letter' paper size.
I have set up a custom paper size called 'Cheque' which I can manually
set and all works fine.
But I need to distribute the app in an mde, so want to change the paper
size when the report is opened as above.
Has anyone got this to work?
--
Bob Darlington
Brisbane



Reply With Quote
  #4  
Old   
Tony Toews
 
Posts: n/a

Default Re: Printing to Custom Size Paper - 10-19-2010 , 04:45 PM



On Mon, 18 Oct 2010 08:51:34 -0400, "Arvin Meyer" <arvinm (AT) invalid (DOT) org>
wrote:

Quote:
I would create a custom Printer object that used this paper size and install
it on each user's machine. Then set the report to that specific printer and
save it.
Actually all you need to do is create the printer size on the printer
server which frequently is the file server.

Go into the list of Printers under the Settings button from the Start
menu. You may need to do this on the print server and you might need
admin privilages. Then click on File >> Server Properties Then you
can create a new form with the sizes you want on it as well as a name.

Then you can follow the below steps inside Access to choose the just
created Paper Size. Go into the design of the report, Click
'File',Page Setup', Click the 'Page' tab., Select 'Specific Printer',,
Pick the printer you are using., Click 'Properties' then the 'Paper'
tab., In 'Paper Size' select 'Custom'. and choose your just created
Paper Size.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
  #5  
Old   
Bob Darlington
 
Posts: n/a

Default Re: Printing to Custom Size Paper - 10-19-2010 , 05:27 PM



Thanks Tony.
That is what I'm doing at the moment.
But when the app is loaded on the client's server, the page size selection
is lost.
I thought that I could overcome this problem using the Printer Object code.

--
Bob Darlington
Brisbane
"Tony Toews" <ttoews (AT) telusplanet (DOT) net> wrote

Quote:
On Mon, 18 Oct 2010 08:51:34 -0400, "Arvin Meyer" <arvinm (AT) invalid (DOT) org
wrote:

I would create a custom Printer object that used this paper size and
install
it on each user's machine. Then set the report to that specific printer
and
save it.

Actually all you need to do is create the printer size on the printer
server which frequently is the file server.

Go into the list of Printers under the Settings button from the Start
menu. You may need to do this on the print server and you might need
admin privilages. Then click on File >> Server Properties Then you
can create a new form with the sizes you want on it as well as a name.

Then you can follow the below steps inside Access to choose the just
created Paper Size. Go into the design of the report, Click
'File',Page Setup', Click the 'Page' tab., Select 'Specific Printer',,
Pick the printer you are using., Click 'Properties' then the 'Paper'
tab., In 'Paper Size' select 'Custom'. and choose your just created
Paper Size.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
  #6  
Old   
Tony Toews
 
Posts: n/a

Default Re: Printing to Custom Size Paper - 10-20-2010 , 12:45 AM



On Wed, 20 Oct 2010 08:27:41 +1000, "Bob Darlington"
<bob (AT) notheredpcman (DOT) com.au> wrote:

Quote:
That is what I'm doing at the moment.
But when the app is loaded on the client's server, the page size selection
is lost.
I thought that I could overcome this problem using the Printer Object code.
Right but are the users creating that paper size on the clients
printer server?

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
  #7  
Old   
Bob Darlington
 
Posts: n/a

Default Re: Printing to Custom Size Paper - 10-20-2010 , 01:09 AM



Yep.

--
Bob Darlington
Brisbane
"Tony Toews" <ttoews (AT) telusplanet (DOT) net> wrote

Quote:
On Wed, 20 Oct 2010 08:27:41 +1000, "Bob Darlington"
bob (AT) notheredpcman (DOT) com.au> wrote:

That is what I'm doing at the moment.
But when the app is loaded on the client's server, the page size selection
is lost.
I thought that I could overcome this problem using the Printer Object
code.

Right but are the users creating that paper size on the clients
printer server?

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
  #8  
Old   
Tony Toews
 
Posts: n/a

Default Re: Printing to Custom Size Paper - 10-21-2010 , 01:01 AM



On Wed, 20 Oct 2010 16:09:10 +1000, "Bob Darlington"
<bob (AT) notheredpcman (DOT) com.au> wrote:

Quote:
Yep.
Well, darn then I don't have a clue.

Tony (sorry to be so unhelpful.)
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
  #9  
Old   
Bob Darlington
 
Posts: n/a

Default Re: Printing to Custom Size Paper - 10-21-2010 , 02:04 AM



Thanks for trying Tony.
It seems that no-one has successfully used the Printer object for custom
paper sizes.

--
Bob Darlington
Brisbane
"Tony Toews" <ttoews (AT) telusplanet (DOT) net> wrote

Quote:
On Wed, 20 Oct 2010 16:09:10 +1000, "Bob Darlington"
bob (AT) notheredpcman (DOT) com.au> wrote:

Yep.

Well, darn then I don't have a clue.

Tony (sorry to be so unhelpful.)
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
  #10  
Old   
David-W-Fenton
 
Posts: n/a

Default Re: Printing to Custom Size Paper - 10-21-2010 , 06:18 PM



"Bob Darlington" <bob (AT) notheredpcman (DOT) com.au> wrote in
news:4cbfe5de$0$10379$afc38c87 (AT) news (DOT) optusnet.com.au:

Quote:
It seems that no-one has successfully used the Printer object for
custom paper sizes.
Have you compared this in MDB vs. MDE? I recall that you're trying
to do this in an MDE, and I'm just wondering if that is the source
of the problem.

--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/

Reply With Quote
Reply




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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.