![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Where's my $ie.Document.Body.InnerText? If I do the following, my $ie.Document doesn't have a "Body" property...should it? $ie=new-object -comobject internetexplorer.application get-childitem > temp.txt $temp=(get-childitem temp.txt).fullname $ie.navigate("file://$temp") $ie.visible=$true $ie.document|get-member Because my $ie.Document doesn't have a "Body" property, I can't extract the text that's supposed to be stored in $ie.Document.Body.InnerText...Can someone help me find my Body? Am I wrong in assuming that such a property should exist? -Charlie |
My System Specs![]() |
| | #2 (permalink) |
| Guest | RE: Where's my $ie.Document.Body.InnerText? Try: $ie.document.documentElement.IHTMLElement_innerText -- Kiron |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: Where's my $ie.Document.Body.InnerText? On May 29, 7:44 pm, Kiron <K...@discussions.microsoft.com> wrote: > Try: > $ie.document.documentElement.IHTMLElement_innerText > -- > Kiron Kiron, That wasn't exactly it, but it led me to the right place (thank you!). I actually found it under: $ie.document.documentElement.innertext What accounts for the difference between what I was seeing and what others were seeing? Different versions of .Net Framework? Perhaps they had prior versions of Monad or Powershell installed at one time? Thanks, Charlie |
My System Specs![]() |
| | #4 (permalink) |
| Guest | Re: Where's my $ie.Document.Body.InnerText? You are right! Sorry for the 'misdirection' but I'm glad you found your 'Body'. Although this may not be the reason, New-Object projects different data models for COM objects when there is a .NET Interop library loaded for that App and the -strict switch is omitted. Use –strict so PowerShell can warn you if the created instance is wrapped. Different OS, .Net and App versions can affect the data model for a COM object also. -- Kiron |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| document.body.innerText is empty/missing | Shawn Dumas | PowerShell | 6 | 12-13-2007 10:40 AM |
| accidentally moved a MS Word document,now it dissapears everytime i open any word document | tim | Vista performance & maintenance | 1 | 09-28-2007 05:40 AM |
| how to get the body of an html document ? | Nicopilami | PowerShell | 4 | 09-28-2007 02:23 AM |
| View and copy document content without opening the document | hash | Vista General | 4 | 07-27-2007 05:55 PM |
| View and copy document content without opening the document | hash | Vista performance & maintenance | 3 | 07-23-2007 10:43 AM |