我需要在IE中複製打開一個XML並在網頁中選擇內容(Ctrl + A)並複製它們(Ctrl + c)並將它們粘貼到記事本中。下面是代碼,但它不起作用。將網頁數據複製並粘貼到記事本中
Dim ie As Object
Dim ieDoc As Object
Dim Data As String
Set ie = CreateObject("InternetExplorer.Application")
ie.navigate "C:\Data\test_10.xml" ie.Visible = True
Do Until (ie.readyState = 4 And Not ie.Busy)
DoEvents
Loop
SendKeys "^a", True
Application.Wait (5)
SendKeys "^c"
Dim FileNo As Integer
FileNo = FreeFile
Open "C:\Data\Sample.txt" For Output As FileNo
SendKeys "^v", True
Close FileNo
它做什麼而不是工作? – 2014-10-17 06:43:07