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

get-html

Closed Thread
 
Thread Tools Display Modes
Old 04-09-2007   #1 (permalink)
William Stacey [C# MVP]
Guest


 

get-html

Bit OT, but psh related. So this guy has a get-html script that grabs the
console as formatted html. So how do I paste this output in OneNote or Word
so it shows up rendered and not just text? I have been scratching my head
for some time. tia

http://ps1.soapyfrog.com/2007/01/06/...grabs-in-html/

--
William Stacey [C# MVP]




Old 04-09-2007   #2 (permalink)
klumsy@xtra.co.nz
Guest


 

Re: get-html

not sure the right syntax but basically you have to put it on the
clipboard and specify the contents are html etc..

Old 04-09-2007   #3 (permalink)
William Stacey [C# MVP]
Guest


 

Re: get-html

I got the cut/paste thing. Let me ask another way. I get the html text
instead of the formatted html.



<pre style='color: #eeedf0; background-color: #012456; '>Windows PowerShell



Copyright (C) 2006 Microsoft Corporation. All rights reserved.



</pre>


--
William Stacey [C# MVP]
PCR concurrency library: www.codeplex.com/pcr
PSH Scripts Project www.codeplex.com/psobject


<klumsy@xtra.co.nz> wrote in message
news:1176175220.231376.148080@l77g2000hsb.googlegroups.com...
| not sure the right syntax but basically you have to put it on the
| clipboard and specify the contents are html etc..
|


Old 04-10-2007   #4 (permalink)
klumsy@xtra.co.nz
Guest


 

Re: get-html

how are you, programatically putting the html on the clipboard, how
are you specifying that the contents of the clip are to be treated as
rich html, rather than as dumb plain text?

Old 07-06-2007   #5 (permalink)
Gaurhoth
Guest


 

Re: get-html

It's a couple of extra steps, but what I generally do is write the HTML to a
file and launch that file using IE (from a script that wraps
get-bufferhtml). When you copy/paste from IE, it shows up correctly in Word.
I don't have the script on this PC or I'd post it.

gaurhoth


"William Stacey [C# MVP]" <william.stacey@gmail.com> wrote in message
news:#FFNkYweHHA.4032@TK2MSFTNGP02.phx.gbl...
> Bit OT, but psh related. So this guy has a get-html script that grabs the
> console as formatted html. So how do I paste this output in OneNote or
> Word
> so it shows up rendered and not just text? I have been scratching my head
> for some time. tia
>
> http://ps1.soapyfrog.com/2007/01/06/...grabs-in-html/
>
> --
> William Stacey [C# MVP]
>
>
>
>

Old 07-07-2007   #6 (permalink)
Keith Hill
Guest


 

Re: get-html

"William Stacey [C# MVP]" <william.stacey@gmail.com> wrote in message
news:#FFNkYweHHA.4032@TK2MSFTNGP02.phx.gbl...
> Bit OT, but psh related. So this guy has a get-html script that grabs the
> console as formatted html. So how do I paste this output in OneNote or
> Word
> so it shows up rendered and not just text? I have been scratching my head
> for some time. tia
>
> http://ps1.soapyfrog.com/2007/01/06/...grabs-in-html/
>


With PSCX 1.1.1 you can do this:

gps | ConvertTo-Html Name, Id, Handles | Join-String | Set-Clipboard -Html
{$_}

Without PSCX 1.1.1, it gets tricky because you have to call the
System.Windows.Forms.Clipboard.SetText($text, 'Html') method on a separate
thread that is configured STA.

--
Keith

Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
convertto-HTML Swamy Channaveera PowerShell 2 03-20-2008 07:44 AM
WM HTML settings HB Vista mail 1 01-16-2008 07:52 PM
html signature Phil Vista mail 3 09-07-2007 05:44 PM
HTML Alice Vista mail 8 03-28-2007 07:50 PM
convertto-html Doug PowerShell 0 02-21-2007 02:42 AM








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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50