Results 1 to 6 of 6

Thread: [RESOLVED] Save an Opened Webpage as .txt

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2010
    Posts
    3

    Resolved [RESOLVED] Save an Opened Webpage as .txt

    Apologies if I'm in the wrong area; I'm new to all of this..

    I have the following, which will open a webpage using the parameters I require. I now need to save the resulting page as a txt file. The second half of the code is my attempt but I'm getting nowhere.

    Thanks in anticipation.

    Set IE = CreateObject("InternetExplorer.Application")
    IE.Navigate "http://www.nats-uk.ead-it.com/fwf-natsuk/public/user/account/login.faces?msg=user.access.required"
    IE.Visible = True
    Wscript.Sleep 5000
    IE.Document.All.Item("j_username").Value = "Tester"
    IE.Document.All.Item("j_password").Value = "Tester"
    IE.Document.All.Item("mainForm:login").Click
    Wscript.Sleep 3000
    IE.Document.All.Item("mainForm:notam_area").Click
    Wscript.Sleep 3000
    IE.Document.All.Item("mainForm:fir_0").Value = "EGTT" 'load FIRs
    IE.Document.All.Item("mainForm:generate").Click
    Wscript.Sleep 12000 'allow data to load



    '--------------------------------------------------------------------------------------------------------------------------------
    'Set docText = WebBrowser1.Document.Body.InnerText
    'Set objFile = objFSO.CreateTextFile(".\AreaBrief.txt", 2) 'create output doc
    'objFile.WriteLine docText 'write to output
    'objFile.Close 'close output
    'MsgBox ("Complete")
    Last edited by Parks; Nov 22nd, 2010 at 08:39 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width