1

I'm currently doing some web automation. My recent problem is to pass content to tinymce text area with excel VBA. After searching all over the internet, I think the possible answer can be found here: How can I pass variable parameters into a Javascript Function using Excel VBA.

However, I tried to do the same as mentioned in above link but failed.

IE.Document.parentWindow.execScript "tinyMCE.get('Server').setContent(" & inputStr & ")", "JavaScript"

Currently, the variable inputStr was declared in VBA as below:

With dataSheet
inputStr = .Range("B35").Value
End With

Does the variable need to be declared as javascript variable? If so, how I can do that in excel VBA?

Please help.

Community
  • 1
  • 1
Razin
  • 11
  • 1

1 Answers1

0

You would not declare as a javascript variable as it would be passed using VBA.

As it is a string variable you would do

Dim inputStr As String
QHarr
  • 83,427
  • 12
  • 54
  • 101