Open Internet Explorer In Excel VBA through direct program path - vba

I had an excel macro used to open an internet explorer application and manipulate the program. It worked perfectly for quite some time. However, some of my users have discovered that they need 64 bit internet explorer running in order to maintain some of their printing preferences (the macro automatically prints pages from our website). The macro could work if the internet explorer program was launched from the link C:\Program Files\Internet Explorer\IExplore.exe.
My previous code to open the ie program was:
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.navigate ("URL")
How can I make it so that my object ie specifically opens the internet explorer through the file path C:\Program Files\Internet Explorer\IExplore.exe and creates it as the object just as it did previously? The internet explorer installed on our computers is ie9 if that matters.

The so-called Desktop version of IE (not the Metro version) runs a 64-bit IE frame with all IE windows being 32-bit. This is accomplished by Windows shipping default with both 64-bit (in Program Files) and 32-bit (in Program Files (x86)) versions of IE. Microsoft doesn't want people to run Desktop version of IE. Their most excellent reasoning is in the article by an Internet Explorer manager at Q&A: 64-Bit Internet Explorer. The 64-bit version of Internet Explorer 9 cannot be set up as the default browser either.
The following from your Q might suggest another way of attacking this: However, some of my users have discovered that they need 64 bit internet explorer running in order to maintain some of their printing preferences: Why is this so and does it have anything to do with the bit-ness of the printer drivers installed?

Related

WebView2 browser don't load the webpage, just a white window is shown

I have built a program in Visual Studio 2019 where I use WebView2 as a browser. When I test the program on the computer where I have VS 2019 installed, it works as it should. But when I test it on another computer, I only get a white box. What am I doing wrong?
In VS 2019, I select "Build> Publish [My file]> Folder>" and click on "Publish". I copy the files and the "runtime" folder to another computer.
I have installed both "windowsdesktop-runtime-5.0.10-win-x64.exe" and "windowsdesktop-runtime-5.0.10-win-x86.exe" on the computer where it does not work.
Dim filePath1 As String
filePath1 = "https://stackoverflow.com/"
WebBrowser.Source = New Uri (filePath1)
To distribute your application that uses WebView2 you'll need to additionally distribute the WebView2 Runtime.
You can either use the evergreen installer which will install the runtime on that machine including an updater that will keep the runtime up to
date or you can use fixed version in which you ship a copy of the WebView2 Runtime with your application and you are responsible for keeping it up to date. You can read more about these options in the WebView2 distribution documentation
I had a similar issue after upgrading the WebView2 Runtime. Problem was eventually solved by deleting the C:\users<name>\appdata\local\EBWebView cache contents.

Outlook "Attach debugger" not available

I am creating an Outlook Add-in using Office js libraries. I was using the option to attach the debugger to debug my javascript application. But it seems that after an Outlook update the option is no longer available. I have tried reinstalling Office but dit not help. Also i created a new Add In with the default functionality and this has no option to attach the debugger. When i click with the right mouse I see no options. Do i have to enable it in some new way ? Has somebody else seen this problem ?
Beginning with Office 365 version 16.0.11629 and Windows 10 version 1903, Office Add-ins running on Office 365 for Windows will use a Microsoft Edge WebView as the runtime.
The Microsoft Edge WebView performs much better than Internet Explorer and features enhanced compliance with modern browser standards including support of the full set of HTML 5 and ECMAScript 2015+.
We recommend that you download the Microsoft Edge DevTools Preview for debugging.
link

Unrecognized references across different Windows & Office versions

I need the ListView control for a VBA project. To use it, I referenced Microsoft Windows Common Controls 6.0 (SP6) and drew a GUI in Office 2010 on Windows 7 (64-bit) containing the ListView object. When I opened the VBA project at work (Office 2007 on Windows XP), an error message said "Can't load the object because it's not available on this machine". When I opened the References dialog, I saw this:
There are two "Microsoft Windows Common Controls 6.0 (SP6)" items: one "MISSING" and one available (but unchecked). The file paths are different: the missing one is supposed to be located in C:\Windows\SysWOW64\MSCOMCTL.OCX, while the available one is located in C:\Windows\system32\MSCOMCTL.OCX.
Why isn't Excel/VBA able to use the available reference? Are these libraries different, despite having the same name? Is one a 64-bit version and the other one a 32-bit one (both Office versions are 32-bit if I recall correctly). How to make my VBA project inter-operable across different Windows or Office versions?
If both versions of Office are 32-bit, I would hazard a guess that the CPU/OS on your home machine is 64-bit, but your work machine is 32-bit. When you have a 32-bit CPU and OS, the drivers are all 32-bit and located in the System32 folder. On a 64-bit CPU/OS, the 64-bit drivers are located in the System32 folder (confusing I know) and the 32-bit ones are located in the SysWOW64 folder.
If you set the path to "C:\Windows\system32\MSCOMCTL.OCX", it should work on both machines because windows will automatically redirect your app to use the SysWOW64 path if necessary, with a few caveats listed on the linked page.

Issue with BHO Component on IE 10(64 bit) browser in Win 8(64bit) OS

Greetings for the day.
I am having a issue making my 64bit ActiveX component to run on Win8(64Bit) over IE10(64bit) browser.
ISSUE:
I am having a 64bit Intranet application in which I have an ActiveX component (COM .dll) which creates an explorer bar and a BHO in Internet Explorer.
I am trying to use this ActiveX Component in Win8 (64Bit) and IE10.
What works for me:
My 32 bit ActiveX version in Win8(64Bit\32bit)\Win7(64bit\32Bit) using IE10 without EPM enabled.
My 64bit ActiveX in Win7(64bit)\Win Server 2008 R2(64bit) using IE7\IE8 (64 bit).
My 64bit ActiveX in Win7(64bit) using IE10 having EPM enabled.
What does not works for me:
My 64bit ActiveX component in Win8(64bit) using IE10(64bit) having EPM enabled.
Having read all the blogs available over the internet, I learnt that for a 64bit ActiveX component to work in Win8(64bit) using IE10, I need to enable EPM(Enhanced Protected Mode) , register both 32bit and 64bit versions of my ActiveX and also my ActiveX should be EPM compatible. Also my dll should be located in AppContainer readable folder like Program Files.
Blog Links:
http://blogs.msdn.com/b/ieinternals/archive/2012/03/23/understanding-ie10-enhanced-protected-mode-network-security-addons-cookies-metro-desktop.aspx
http://www.askyb.com/bho/step-by-step-guide-to-making-you-bho-epm-compatible-with-ie11-on-windows-8/
What I have tried So far:
Made my ActiveX component EPM compatible according to the above links.
(My ActiveX dll has 5-6 classes and different .rgs files for registering each. So I added the AppContainer GUID in a separate .h file and included that file in each class .cxx file. Also included the
‘Implemented Categories’ in all .rgs file.)
Registered both 32bit and 64bit versions of my ActiveX.
Enabled the EPM.
Now I am able to get only my explorer bar enabled with EPM. But other BHO functionality is not working.
One of the functionalities of my ActiveX is that it reads the Machine Name and returns it. But in Win8(64bit) using IE10 it is not working even after doing all of the above.
Bottom-line is that my ActiveX is not working completely as expected,ie., The instance of one of the BHO Component(which is used to read the clients Machine Name) is not getting instantiated as expected,same Component works fine with a 32 bit BHO Component on the same Environment :(
Is it something I did wrong in making my ActiveX component as EPM compatible?
As I want my application to run only in 64bit mode as it’s an intranet application, do I still need to register both 32bit and 64bit versions of my ActiveX?
Should both the 32bit and 64bit versions should be made EPM compatible?
Should both 32bit and 64bit have the same CLSID?
Any quick solution would be greatly appreciated, Since I’m going nuts working on this issue from past few days, hoping for a positive response from your guys.
Thanks in advance

Windows 8 VB.net 2012 WebBrowser control IE 9 or 10

Hey all I am trying to figure out how to set the WebBrowser control in my windows form to emulate IE9 or IE10 under Windows 8.
Currently, when I use the webbrowser control on my form and load up a website it tells me:
Your browser, Internet Explorer 7, does not support the advanced...
However, going to that same site with just the normal IE10 browser shows the page just fine. I also double-checked the IE9 compatibility using the Developer tools within IE10 to emulate IE9 standards and that also worked.
I also tried adding my EXE file name to the registory:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\
Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION
For 64 bit Windows 8 but that doesn't seem to have any effect on it when I run the program.
Any help would be great!
FIXED:
Using vbTestProg.exe for the build EXE
Using the vbTestProg.vshost.exe for the Debug inside VB
If you're application is a 64bit application, or compiled for AnyCPU and running on 64bit Windows, you need to set the emulation setting in:
HKEY_LOCAL_MACHINE\SOFTWARE\
Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION
(Without Wow6432Node.) The registry location you specified is for 32bit applications running on 64bit operating systems.