Avatar of Chuck Morrison
Chuck Morrison
Flag for United States of America asked on

Set Magnification for URL in MS Access WebControl Using VB

In MS Access, I have a webcontrol on a form.  I want to be able to force magnification for the URL to 125 percent.  I have found several articles on Google about this, but nothing seems to work for me.  Here is what I have now - the last line represents the best suggestion I was able to find on the intrawebs:

DoCmd.OpenForm "WebBrowser", acNormal
DoCmd.Maximize
       
Forms!WebBrowser.RecordSource = "Wordpress"
    Forms!WebBrowser.Filter = "[Select]=-1"
    Forms!WebBrowser.FilterOn = True

'''''  the URL comes from tbWordpress from either be in Site, NewPost or NewPage in the Wordpress table
    Forms!WebBrowser!WebBrowser0.ControlSource = "NewPost"
   
   
    Forms!WebBrowser!WebBrowser0.ExecWB OLECMDID_OPTICAL_ZOOM, ExecOpt.OLECMDEXECOPT_DONTPROMPTUSER, 150, DBNull.Value
Microsoft AccessVBA

Avatar of undefined
Last Comment
Gustav Brock

8/22/2022 - Mon
Fabrice Lambert

Hmm, instead of using akward API calls, what about using a textbox right above the webbrowser control ?

Simply configure the texbox in design mode, have VBA update its data, and you're done.
Chuck Morrison

ASKER
Text box for what?  The URL?  The zoom level?
Fabrice Lambert

For the URL of course.
Choose a font and its size matching your needs, and never ever touch it again.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Chuck Morrison

ASKER
The URL for the WebBrowser control is variable as is (possibly) the magnification, so I can't set and forget.  The control needs to be magnified not the URL.  Some webpages will need to be 125%, some will need to be 75%.  I need help understanding how putting a URL in a text box with a specific font is going to change the magnification in the control?
Fabrice Lambert

So, this is the control, not the URL.
I want to be able to force magnification for the URL to 125 percent.
Ehence the confusion.
ASKER CERTIFIED SOLUTION
Gustav Brock

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.