Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

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.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

Where's my $ie.Document.Body.InnerText?

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 05-29-2007   #1 (permalink)
cmyers
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 SpecsSystem Spec
Old 05-29-2007   #2 (permalink)
Kiron
Guest


 

RE: Where's my $ie.Document.Body.InnerText?

Try:
$ie.document.documentElement.IHTMLElement_innerText
--
Kiron
My System SpecsSystem Spec
Old 05-30-2007   #3 (permalink)
cmyers
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 SpecsSystem Spec
Old 05-31-2007   #4 (permalink)
Kiron
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 SpecsSystem Spec
Closed Thread

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


Update your Vista Drivers Update Your Drivers Now!!

Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008