macro stopped at the T.execCommand "SelectAll"
>>Object doesnt support this property or method.
Then the code is not compatible with your OS or your version of IE.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I have a row with cells containing text strings with HTML code inside. I would like to see just HTML preview (no code) within cells. I would like to still have HTML code inside the cell, but it apears as text without <> etc...
Is that possible?
I tried
Sub Sample2()
Dim Ie As Object
Set Ie = CreateObject("InternetExplorer.Application")
With Ie
.Visible = False
.Navigate "about:blank"
.document.body.InnerHTML = Sheets("Sheet1").Range("A1").Value
.document.body.createtextrange.execCommand "Copy"
ActiveSheet.Paste Destination:=Sheets("Sheet1").Range("A1")
.Quit
End With
End Sub
I get stuck with this line .document.body.createtextrange.execCommand "Copy"
could someone help me?
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
macro stopped at the T.execCommand "SelectAll"
>>Object doesnt support this property or method.
Then the code is not compatible with your OS or your version of IE.
i have the newest IE and windows 8...
but thanks for all
i will try something more..
Did you give my example a try? It worked for me in IE 11, Windows 7, where your code and Andreas' code did not.
Eric
honestly, i tried, but i didnt Set a reference to MS Forms 2.0 as you proposed there. I am not sure what you mean with that. So it is not working for me.
sorry
Did you give my example a try?
I must apologize, it would have been better if I had not replied to this post. Your code works perfect.
I was too talkative and just wanted to explain why his code does not work.
Andreas.