473,387 Members | 1,597 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

PrtDevMode I think

I have a report the size is A5 landscape. I need to get the page dimensions
using VBA.

If I open the report in PrintPreview I get

Using the well documented with such expressions as
strDevModeExtra = Rpt.PrtDevMode
' Gets current DEVMODE structure.
DevString.RGB = strDevModeExtra

I eventually get the information that
DM.intPaperLength = 2970 and
DM.intPaperWidth = 2100 and
DM.intOrientation = 1

This corresponds to A4 portrait.

I then open the report in design view, go to page set up. Change a margin
from 10mm to 11mm and back again to 10mm to force me to save the report. If
I then open the report in PrintPreview I get all the right answers i.e

DM.intPaperLength = 2100 and
DM.intPaperWidth = 1480 and
DM.intOrientation = 2

This is the correct A5 landscape.

How can I get the correct information using VBA

TIA

Phil
Nov 13 '05 #1
0 1256

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gabriele Bertolucci | last post by:
Sorry for my previous post in italian language. It was a cut 'n paste problem :-) ============================================================================ Do you know how to reach and use...
2
by: Esmee | last post by:
Hi there, I want to be able to save the PrtDevmode en Prtdevnames properties of several reports into a table. So I open a report in Design mode, get the prtdevmode en prtdevname from the report,...
5
by: Randy Harris | last post by:
I'm finding working with PrtDevMode a nightmare. Is there any particular reason that Microsoft didn't simply provide a PrinterName argument for printing a report? That seems like a pretty...
2
by: jess | last post by:
Hi All, I am using the PrtDevMode property of a report open in design view to try and flip the orientation of the report between Portrait and Landscape in a user control box before the report is...
23
by: JDeats | last post by:
Just spent some time browsing around here: http://msdn.microsoft.com/Longhorn/ I can see the benefits from WinFS (as long as we tag all in-coming data this should be nice, tagging everything...
3
by: Angel | last post by:
Hello again (and again, and again...) I think I'm getting closer to solving my initial problem of calling unmanaged code. I managed to call the functions with user-defined structs w/o getting any...
2
by: veerleverbr | last post by:
Hi, Can anyone give me sample code on how to use de info in PrtDevMode en PrtDevNames of Access from within VB.NET? This is how it's done in VB6:...
29
by: GhostInAK | last post by:
I'm seeing a terribly distubing number of questions that have no purpose in existing. As an example: How do I change the position of a stream? Hmm.. Could it be some method on the stream...
0
by: raylopez99 | last post by:
I ran afoul of this Compiler error CS1612 recently, when trying to modify a Point, which I had made have a property. It's pointless to do this (initially it will compile, but you'll run into...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.