Printing to Custom Size Paper

Showing 1-19 of 19 messages
Printing to Custom Size Paper Bob Darlington 10/18/10 12: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


Re: Printing to Custom Size Paper Arvin Meyer 10/18/10 5: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" <b...@notheredpcman.com.au> wrote in message
news:4cbbf236$0$25360$afc38c87@news.optusnet.com.au...

Re: Printing to Custom Size Paper Bob Darlington 10/18/10 4: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" <arv...@invalid.org> wrote in message
news:-9mdnYm4zfNQ3yHRnZ2dnUVZ_vqdnZ2d@earthlink.com...

Re: Printing to Custom Size Paper Tony Toews 10/19/10 2:45 PM
On Mon, 18 Oct 2010 08:51:34 -0400, "Arvin Meyer" <arv...@invalid.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/

Re: Printing to Custom Size Paper Bob Darlington 10/19/10 3: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" <tto...@telusplanet.net> wrote in message
news:594sb613vvdp3ddfb44ua1g42iok2sqbv2@4ax.com...

Re: Printing to Custom Size Paper Tony Toews 10/19/10 10:45 PM
On Wed, 20 Oct 2010 08:27:41 +1000, "Bob Darlington"
<b...@notheredpcman.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/

Re: Printing to Custom Size Paper Bob Darlington 10/19/10 11:09 PM
Yep.

--
Bob Darlington
Brisbane
"Tony Toews" <tto...@telusplanet.net> wrote in message
news:re0tb6902da88ojsldg7vl1ofoi8a6avrg@4ax.com...

Re: Printing to Custom Size Paper Tony Toews 10/20/10 11:01 PM
On Wed, 20 Oct 2010 16:09:10 +1000, "Bob Darlington"
<b...@notheredpcman.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/

Re: Printing to Custom Size Paper Bob Darlington 10/21/10 12: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" <tto...@telusplanet.net> wrote in message
news:volvb6lqghla3jhej2mds0uqh04ol2m5gb@4ax.com...

Re: Printing to Custom Size Paper David-W-Fenton 10/21/10 4:18 PM
"Bob Darlington" <b...@notheredpcman.com.au> wrote in
news:4cbfe5de$0$10379$afc38c87@news.optusnet.com.au:

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

Re: Printing to Custom Size Paper Bob Darlington 10/21/10 5:45 PM
David,
I'm still testing in the mdb on my development PC and I can't get it to work
there.
Hopefully, if I can get it to work in the mdb, it will (might) work in the
mde at the client site.
That's my goal anyway.
I still haven't heard from anyone who has successfully done so in either
file form.

--
Bob Darlington
Brisbane
"David-W-Fenton" <NoEmail@SeeSignature.invalid> wrote in message
news:Xns9E18C477462E8f99a49ed1d0c49c5bbb2@74.209.136.99...

Re: Printing to Custom Size Paper yanto 10/23/10 1:00 AM
Hi Bob,
I have the similar problem, so far I did what Tony suggested, I go to
client place, setup CUSTOM page on server properties, open my report
in design mode, change pagesize as CUSTOM and recompile it, so far
it's ok, but I prefer to do once a time so I use this way, I put my
report on backend database so you just set once for the custom page
then I call that report from my frontend so now everytime I copy my
modified fron'tend, I don't need to set the pagesize in my client
place even I can email it...but this doesn't works if I use Ms Access
Runtime in my client place
HTH

Yanto

On Oct 22, 7:45 am, "Bob Darlington" <b...@notheredpcman.com.au>
wrote:


> David,
> I'm still testing in the mdb on my development PC and I can't get it to work
> there.
> Hopefully, if I can get it to work in the mdb, it will (might) work in the
> mde at the client site.
> That's my goal anyway.
> I still haven't heard from anyone who has successfully done so in either
> file form.
>
> --
> Bob Darlington
> Brisbane"David-W-Fenton" <NoEm...@SeeSignature.invalid> wrote in message

>
> news:Xns9E18C477462E8f99a49ed1d0c49c5bbb2@74.209.136.99...
>
>
>
> > "Bob Darlington" <b...@notheredpcman.com.au> wrote in
> >news:4cbfe5de$0$10379$afc38c87@news.optusnet.com.au:
>
> >> 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/- Hide quoted text -
>
> - Show quoted text -

Re: Printing to Custom Size Paper Phil 10/24/10 12:45 AM

Have you tried the old fashioned method (AK2) using things like PRTMIP &
DEVMODE?

Phil

Re: Printing to Custom Size Paper Bob Darlington 10/24/10 3:33 PM
Phil,
The app is distributed as an mde.

--
Bob Darlington
Brisbane
"Phil" <ph...@stantonfamily.co.uk> wrote in message
news:ia0o79$h3v$1@speranza.aioe.org...

Re: Printing to Custom Size Paper Bob Darlington 10/24/10 3:36 PM
Thanks Yanto.
Unfortunately, I have a mixture of runtime and non runtime installations.
I hadn't thought about attaching the report to the backend though, so I'll
have a play with that idea.

--
Bob Darlington
Brisbane
"yanto" <yant...@gmail.com> wrote in message
news:0428155f-de19-4e58-b165-6e49fd728809@29g2000prb.googlegroups.com...

Re: Printing to Custom Size Paper Phil 10/24/10 4:02 PM
On 24/10/2010 23:33:04, "Bob Darlington" wrote:
> Phil,
> The app is distributed as an mde.
>

Don't think that is a problem

Phil

Re: Printing to Custom Size Paper Bob Darlington 10/24/10 5:02 PM
Phil,
I thought that those methods required the reports to be able to be opened in
design mode, which you can't do in mde.

--
Bob Darlington
Brisbane
"Phil" <ph...@stantonfamily.co.uk> wrote in message
news:ia2duk$e0d$1@speranza.aioe.org...

Re: Printing to Custom Size Paper Phil 10/25/10 9:18 AM
On 25/10/2010 01:02:12, "Bob Darlington" wrote:
> Phil,
> I thought that those methods required the reports to be able to be opened
> in design mode, which you can't do in mde.
>

Er um deep crimson

Of course you're right

apologies

Phil

Re: Printing to Custom Size Paper Bob Darlington 10/25/10 4:38 PM
Thanks to all for their help on this one.
I've reluctantly come to the conclusion that I can't use the Printer object
to reset a custom paper page size after migrating my front end to the client
PCs, so I've given up on that tack.
Instead, I moved along the line suggested by Yanto (in this thread) and
created a new db to hold the Cheque report with attendant queries, linked
relevant tables to the backend db and loaded it into the user's 'CurrentDir'
folder.
I can then open it with OpenCurrentDatabase as follows:

    Set objAccess = New Access.Application
        With objAccess
            lngRet = apiSetForegroundWindow(.hWndAccessApp)
            lngRet = apiShowWindow(.hWndAccessApp, SW_NORMAL)
            lngRet = apiShowWindow(.hWndAccessApp, SW_MAXIMIZE)
            .OpenCurrentDatabase CurrentDir & "cheques.mdb"
            .DoCmd.OpenReport strReport, acViewPreview, , , , gblPropNum
        End With


--
Bob Darlington
Brisbane
"Bob Darlington" <b...@notheredpcman.com.au> wrote in message
news:4cbbf236$0$25360$afc38c87@news.optusnet.com.au...