Getting the current resolution with VBA?

A

Alex Gilbert

Is there a way to get the value of the user's current resolution with
VBA? Maybe having it talk to AppleScript somehow?

I have an Add-in that does this in Windows using "user32" and "gdi32",
but I need to have it work on a Mac as well.
 
J

Jim Gordon MVP

Hi Alex,

The closest thing I could find is MsoScreenSize.

Will that do it for you?

-Jim


Is there a way to get the value of the user's current resolution with
VBA? Maybe having it talk to AppleScript somehow?

I have an Add-in that does this in Windows using "user32" and "gdi32",
but I need to have it work on a Mac as well.

--
Jim Gordon
Mac MVP

MVPs are not Microsoft Employees
MVP info
 
P

peterthebag

Hi,

You could use a unix utility called cscreen and an applescript.

you can get cscreen from

http://scriptbuilders.net/files/cscreen1.0.html

just install in in the usr/bin directory

this is normally an invisible directory, so you need to use a utility
like OnyX to show invisibles.
you can then use an applescript like this one to get the screen
resolution reported by cscreen.

do shell script "cscreen"
set ScreenRes to the result
display dialog ScreenRes


rather than using display dialog you could use the value returned as
an input for some other process - telling PPT which version of a
slideshow to show, for example.

Hope that helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top