![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 |
#4
| |||
| |||
|
|
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. |
#5
| |||
| |||
|
|
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/ |
#6
| |||
| |||
|
|
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. |
#7
| |||
| |||
|
|
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/ |
#8
| |||
| |||
|
|
Yep. |
#9
| |||
| |||
|
|
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/ |
#10
| |||
| |||
|
|
It seems that no-one has successfully used the Printer object for custom paper sizes. |
![]() |
| Thread Tools | |
| Display Modes | |
| |