[AccessD] A2003: Set Default Zoom on Web Browser Control

Darren darren at activebilling.com.au
Tue Feb 11 17:30:12 CST 2014


Howdy Jack - Sure. 

In the declarations of my form I have this

Option Compare Database
Option Explicit
Const OLECMDID_OPTICAL_ZOOM As Long = 63
Const OLECMDEXECOPT_DONTPROMPTUSER As Long = 2

On my form I have a MicrosoftWebBrowser control called "actXWebBrowser_1"
Also on my form have a 2 column combo box (called cmbZoom) manually
populated with a value list of the following
50;"50%";75;"75%";80;80%;90;"90%";100;"100%";120;"120%";150;"150%";200;"200%
"
Column widths = 0cm;2.544cm

In the afterupdate of the combo I have this
Private Sub cmbZoom_AfterUpdate()
Me.actXWebBrowser_1.ExecWB OLECMDID_OPTICAL_ZOOM,
OLECMDEXECOPT_DONTPROMPTUSER, CLng(Me.cmbZoom), vbNull
End Sub

Once the file has been loaded into the browser control with something like
Me.actXWebBrowser_1.Navigate "C:\SomeFolder\SomeFile.log"
I can play with the zoom of it - works a treat

Many thanks

Darren


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jack drawbridge
Sent: Monday, 10 February 2014 11:26 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] A2003: Set Default Zoom on Web Browser Control

Darren,

Every now and then I get lucky with Google. I'm retired and only dabble with
Access and  participate in several forums. My search led to a few hits based
on your terms/words.
Could you post a sample of the code to show the set up in context?
Thanks.
jack



On Mon, Feb 10, 2014 at 12:42 AM, Darren <darren at activebilling.com.au>wrote:

> Thanks Jack,
> I did actually try and find a solution before coming to the list.
> I'm a bit of an old age novice and I did see the execute portion of 
> that code before, but did not see the declarations.
> So every time I ran it, the execute bit would fail due to no declarations.
> But I'm not bright enough to realise that.
> The version you directed me to had the declarations - A real DUH! moment.
> Now works a treat and is incorporated into my form.
> Thanks again.
> Darren
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jack 
> drawbridge
> Sent: Monday, 10 February 2014 10:51 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] A2003: Set Default Zoom on Web Browser Control
>
> You're welcome.
> Happy to help.
>
>
> On Sun, Feb 9, 2014 at 6:45 PM, Darren <darren at activebilling.com.au>
> wrote:
>
> > Hi Jack,
> > Excellent - just what I needed - thank you Darren
> >
> > -----Original Message-----
> > From: accessd-bounces at databaseadvisors.com
> > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jack 
> > drawbridge
> > Sent: Friday, 7 February 2014 12:49 PM
> > To: Access Developers discussion and problem solving
> > Subject: Re: [AccessD] A2003: Set Default Zoom on Web Browser 
> > Control
> >
> > I found this link from 2011
> > http://www.xtremevbtalk.com/showthread.php?t=321811
> >
> > Hope it helps.
> >
> >
> > On Thu, Feb 6, 2014 at 8:31 PM, Darren <darren at activebilling.com.au>
> > wrote:
> >
> > > Hi All
> > >
> > > I have a WebBrowserControl sitting on a form and it displays the 
> > > contents of a text file.
> > >
> > > Does anyone know how I can set the default zoom for that 
> > > WebBrowserControl to say.75% on form load?
> > >
> > > Many thanks in advance
> > >
> > > DD
> > >
> > > --
> > > AccessD mailing list
> > > AccessD at databaseadvisors.com
> > > http://databaseadvisors.com/mailman/listinfo/accessd
> > > Website: http://www.databaseadvisors.com
> > >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list