I used to call an application from VBA/Excel. This was done via Internet Explorer and without human intervention.
This week, Windows 11 was installed. Now MS Edge opens automatically and invariably asks if the application should be opened.
Is there any way that I can skip this question? The application is working perfectly, but I just want to automatically open the application.
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Visible = False
.navigate "https://robostorage.blob.core.windows.net/clickonce/PbnPlayer/RoboBridge.PbnPlayer.application?pbnFileName=" & oefRobInp
End With
Related
I'm using automate excel vba macro send emails. I want to set it in Task Scheduler to make it automate. When screen is not locked everything works perfect, but when set Task Scheduler and lock the screen the macro stop at below moment. It doesn't return any errors. It just stop and shows blank new email window in outlook app.
Do you know if there is any option to fix that?
Dim xInspect As Object
Dim pageEditor As Object
Set xInspect = OutMail.GetInspector
Set pageEditor = xInspect.WordEditor
Worksheets("Email_Sender_Body").Range("K1:K" & row_count_body).Copy
pageEditor.Application.Selection.Start = Len(.Body)
pageEditor.Application.Selection.End = pageEditor.Application.Selection.Start
pageEditor.Application.Selection.PasteAndFormat (wdFormatPlainText)
.Display
Set pageEditor = Nothing
Set xInspect = Nothing
I want to set it in Task Scheduler to make it automate
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution.
Read more about that in the Considerations for server-side Automation of Office article.
As a possible workaround you may consider using the Open XML SDK if you deal with open XML documents only, see Welcome to the Open XML SDK 2.5 for Office for more information. Or you may also consider third-party components designed for the server-side execution.
A low-level API on which Outlook is based can be used from a Windows service - Extended MAPI. Or in case of Exchange server accounts you may use EWS or Graph API. See Explore the EWS Managed API, EWS, and web services in Exchange for more information.
I am trying to access a folder in Sharepoint that is secured (https). I am using a little VBA macro in excel that uses the file system object . see code below that was found in similar thread. the macro would open the .csv file in the folder and scan for a certain string.
Sometimes it would work but sometimes it would say 'path not found' in that case I would open the sharepoint site with Microsoft Explorer (browser) and then it all would have worked.
Now that explorer has been decommissioned I cannot open that path in explorer anymore .
any suggestion ? I know mapping/syncing the sharepoint would be another option but I want my tool to be used by different users and I guess mapping/syncing would make the new path , user dependent .
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFSO.GetFolder(//companyname.sharepoint.com#ssl/sites/Invoices/Shared Documents/Tre/daily)
For each oFile in oFolder.Files
...etc etc.
thanks
Marthomas
While IE is not available from User Interface, you still can use it in macro, so it is possible to login to SharePoint using IE and work with SharePoint.
I have multiple HTML files in my folder. I need to fetch some data from each html files and copy those value in excel sheet using VBA MACRO. how to write code to achieve this?.
And the html files should open in Microsoft edge browser (not in IE)
If any one knows the solution please help me out.
Thank you
You said,'the HTML files should open in Microsoft Edge browser (not in IE)'.
If your goal is to copy the data to an Excel sheet then I think it should not matter whether you are doing it via IE or Edge.
If you are thinking that as IE browser is retired on some Windows OS and your IE VBA Automation will not work then I would like to inform you that IE VBA automation will continue to work even after the IE browser retirement.
If you still want to automate the Edge browser then as suggested by the community member, you will need to use the web driver.
For VBA IE Automation the general idea would be to create an object of the IE or Edge browser from the Excel VBA editor. Launch the browser. Browse the web page. browse to the web element and copy the data to the Excel sheet.
If you use Selenium then you also need to use the library for Excel and create an object of the Excel file.
For more information, you could refer to the links below.
Use WebDriver to automate Microsoft Edge
Automate Microsoft Edge
Similar kinds of articles and docs you could find for the IE VBA Automation.
You could refer to the docs and try to make tests on your side. If you are stuck somewhere or have any questions. you could post a new question on this forum.
I have several automation scripts that I wrote to move information in and out of Office applications using VBA. I put all of these together using Office 2003 on a Window 7 computer.
My organization finally got around to moving over to using Windows 10 and Office 2016, and the changeover broke all of the scripts that open one application from the other.
Each script uses these two lines to start the other application:
Dim objExcel As Excel.Application
Set objExcel = CreateObject("Excel.Application")
If I run this snippet from Word started as a standard user, I get an error saying, "Run-time error '429':
ActiveX component can't create object" and debugging tells me the error is from the 'CreateObject' line.
If I run Word as an Administrator, though, Excel starts like I expect it to and I'm able to work with the application object.
I don't want to have to run the application or the automation scripts as an administrator. I'm guessing this is a configuration issue, but my google-fu is failing me.
How do I allow access to the Office applications automation object model from standard users in Windows 10?
I am working on Excel add-in but I am new in office.js.
I would like to know if there is a way to set a browser different from IE 11 as default browser to open the add-in.
I saw the same question on URL below, but I didnĀ“t find if the API mentioned on the answer was developed.
How to set the default browser in word addin
I'm afraid that there is currently no API to determine which browser is used when the add-in is running in desktop Office on Windows. (If it is running in Office Online, then of course it opens in whatever browser you are using.)