originalrobby
asked on
Setup of Page before Printing
Hi all,
I need to be able to setup my page layout before I print a report... I need to specify somehow:
PageTop = 0.1" ' just as an example
PageBottom = 0.1"
PageLeft = .7"
PageRight = .7"
I need it to print Portrait with the default printer....
But I must do this with code, on my print command... can anybody help me ? This is in ACCESS VBA by the way..
Thank You,
Robert Mezei
I need to be able to setup my page layout before I print a report... I need to specify somehow:
PageTop = 0.1" ' just as an example
PageBottom = 0.1"
PageLeft = .7"
PageRight = .7"
I need it to print Portrait with the default printer....
But I must do this with code, on my print command... can anybody help me ? This is in ACCESS VBA by the way..
Thank You,
Robert Mezei
ASKER
Umm, I have code actually that does this and it is not lengthy at all, only it is in VB.NET.
It is ACCESS 97, VBA 5.0 I believe...
I do indeed need to create a printer object and specify the top, bottom, left and right margins, and somwhow like this:
With Printer 'how do i define it ?
' Initialize Printer Object
Printer.Orientation = vbPRORPortrait ' ? again not sure
Printer.PrintQuality = 300
Printer.Print ""
PageBottom = (.Height + .ScaleHeight) / 2 - 720 ' example
If anyone can help me, please do so, I'd greatly appreciate it, it's going in an database application of 2000+ records
It is ACCESS 97, VBA 5.0 I believe...
I do indeed need to create a printer object and specify the top, bottom, left and right margins, and somwhow like this:
With Printer 'how do i define it ?
' Initialize Printer Object
Printer.Orientation = vbPRORPortrait ' ? again not sure
Printer.PrintQuality = 300
Printer.Print ""
PageBottom = (.Height + .ScaleHeight) / 2 - 720 ' example
If anyone can help me, please do so, I'd greatly appreciate it, it's going in an database application of 2000+ records
ASKER
Umm, I have code actually that does this and it is not lengthy at all, only it is in VB.NET.
It is ACCESS 97, VBA 5.0 I believe...
I do indeed need to create a printer object and specify the top, bottom, left and right margins, and somwhow like this:
With Printer 'how do i define it ?
' Initialize Printer Object
Printer.Orientation = vbPRORPortrait ' ? again not sure
Printer.PrintQuality = 300
Printer.Print ""
PageBottom = (.Height + .ScaleHeight) / 2 - 720 ' example
If anyone can help me, please do so, I'd greatly appreciate it, it's going in an database application of 2000+ records
It is ACCESS 97, VBA 5.0 I believe...
I do indeed need to create a printer object and specify the top, bottom, left and right margins, and somwhow like this:
With Printer 'how do i define it ?
' Initialize Printer Object
Printer.Orientation = vbPRORPortrait ' ? again not sure
Printer.PrintQuality = 300
Printer.Print ""
PageBottom = (.Height + .ScaleHeight) / 2 - 720 ' example
If anyone can help me, please do so, I'd greatly appreciate it, it's going in an database application of 2000+ records
ASKER
Umm, I have code actually that does this and it is not lengthy at all, only it is in VB.NET.
It is ACCESS 97, VBA 5.0 I believe...
I do indeed need to create a printer object and specify the top, bottom, left and right margins, and somwhow like this:
With Printer 'how do i define it ?
' Initialize Printer Object
Printer.Orientation = vbPRORPortrait ' ? again not sure
Printer.PrintQuality = 300
Printer.Print ""
PageBottom = (.Height + .ScaleHeight) / 2 - 720 ' example
If anyone can help me, please do so, I'd greatly appreciate it, it's going in an database application of 2000+ records
It is ACCESS 97, VBA 5.0 I believe...
I do indeed need to create a printer object and specify the top, bottom, left and right margins, and somwhow like this:
With Printer 'how do i define it ?
' Initialize Printer Object
Printer.Orientation = vbPRORPortrait ' ? again not sure
Printer.PrintQuality = 300
Printer.Print ""
PageBottom = (.Height + .ScaleHeight) / 2 - 720 ' example
If anyone can help me, please do so, I'd greatly appreciate it, it's going in an database application of 2000+ records
Originalrobby,
Please don't hit the refresh button, which on EE will cause duplicate posts. Unlike VB, there is no printer object in A2000 and prior. The only way to deal with printers is via the PrtDevMode and PrtMip structures. Handling those can become quite complex.
It's simply faster/cheaper to buy this code in one form or another.
Jim.
Please don't hit the refresh button, which on EE will cause duplicate posts. Unlike VB, there is no printer object in A2000 and prior. The only way to deal with printers is via the PrtDevMode and PrtMip structures. Handling those can become quite complex.
It's simply faster/cheaper to buy this code in one form or another.
Jim.
ASKER
Umm, I have code actually that does this and it is not lengthy at all, only it is in VB.NET.
It is ACCESS 97, VBA 5.0 I believe...
I do indeed need to create a printer object and specify the top, bottom, left and right margins, and somwhow like this:
With Printer 'how do i define it ?
' Initialize Printer Object
Printer.Orientation = vbPRORPortrait ' ? again not sure
Printer.PrintQuality = 300
Printer.Print ""
PageBottom = (.Height + .ScaleHeight) / 2 - 720 ' example
If anyone can help me, please do so, I'd greatly appreciate it, it's going in an database application of 2000+ records
It is ACCESS 97, VBA 5.0 I believe...
I do indeed need to create a printer object and specify the top, bottom, left and right margins, and somwhow like this:
With Printer 'how do i define it ?
' Initialize Printer Object
Printer.Orientation = vbPRORPortrait ' ? again not sure
Printer.PrintQuality = 300
Printer.Print ""
PageBottom = (.Height + .ScaleHeight) / 2 - 720 ' example
If anyone can help me, please do so, I'd greatly appreciate it, it's going in an database application of 2000+ records
ASKER
NOOOOOOOOOO!!!!!!!!!!
Sorry guys, I didnt realize it was reposting it!!!! CR*P!
Sorry guys, I didnt realize it was reposting it!!!! CR*P!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept question, points to JDettman
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
1William
EE Cleanup Volunteer
I will leave a recommendation in the Cleanup topic area that this question is:
Accept question, points to JDettman
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
1William
EE Cleanup Volunteer
The reason I say this is that the code is quite lengthy and it would take you a considerable amount of time to come up with it. OTF printing runs about $100 or so, a book is about $50. This is one of those cases where you'd spend a lot more trying to come up with it on your own then simply buying it.
Jim.