How to run javascript code from Excel VBA

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
techimac
Posts: 482
Joined: Fri Feb 20, 2015 9:27 pm

How to run javascript code from Excel VBA

Post by techimac » Sat May 22, 2021 6:18 am

Is it possible to run javascript DOM from VBA?

Because if I use latest iMacros, javascript is not supported.

I have to use vbs or Excel VBA.
Available for custom iim, javascript iMacros scripts
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to run javascript code from Excel VBA

Post by chivracq » Fri Dec 03, 2021 1:36 am

techimac wrote:
Sat May 22, 2021 6:18 am
Is it possible to run javascript DOM from VBA?

Because if I use latest iMacros, javascript is not supported.

I have to use vbs or Excel VBA.

Only reacting/quoting because some Spammer/Fake User had reacted (who "later" edited their Reply to add some Spam Link), I "most of the time' don't react to your Threads anymore because of the "constant" Low Qlt too often, sorry... :|

>>>
davie wrote:
Tue Jun 29, 2021 10:29 am
I've been trying with

Code: Select all

dim code as String
set code = "alert( & """ & "hello world" & """ & ")"
IEObject.document.parentWindow.execScript "eval( " & code & ")"
and get an execution error 80020101

A I missing something?

>>>

EDIT by @chivracq (Mod):
Spam Link from Spammer/Fake User removed...

A bit of a "Fake" Reply I already had "the Feeling" when I had approved your Post 5 months ago, even if @OP didn't even react, turned out to be True when you silently edited your Post today... :roll: , but I removed your Spam Link, you are a Stupido, ah-ah...! :roll:

=> Next Step (=> @davie):
Clean your Sig from any Link(s)/(Search) Keywords in it not related to iMacros or Web-Automation, and post some Reply that "you'll be behaving and not spamming the Forum anymore", within a few hours, or I'll have to ask the Forum Admin to delete your Account... :!:
(All your Posts will then also be automatically deleted...)
... And you won't get a 2nd Warning, + I'll keep monitoring you... :idea:

... And clean your Sig before posting your Reply if you want "to stay on the Forum" and to "behave", I'll probably see your Reply IRT (or even before you post it, or some Monitoring Script(*) of mine will "catch" it), or my Script will probably automatically report your Account to be banned... :idea:

(*): Tja...!, what did you expect, ah-ah...!? This is a Tech Forum about Web-Automation, don't "fuck up" with the "Specialists", ah-ah...! :idea: :P :wink: :roll:

EDIT_1: (13h later)
No "Reaction" , => the User has been reported to the Forum Admin to be deleted, together with all their Posts... :|
(My "clean" Quotes will remain...)

EDIT_2: (12d later)
The Fake User/Spammer has been deleted... Thanks @Forum Admin... :D
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Post Reply