<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MemoSoup &#187; VB</title>
	<atom:link href="http://www.memosoup.com/category/scripts/vb/feed" rel="self" type="application/rss+xml" />
	<link>http://www.memosoup.com</link>
	<description>Mix of the things I always forget</description>
	<lastBuildDate>Thu, 09 Feb 2012 12:24:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>VBA: how to read text file</title>
		<link>http://www.memosoup.com/20120205/vba-how-to-read-text-file.html</link>
		<comments>http://www.memosoup.com/20120205/vba-how-to-read-text-file.html#comments</comments>
		<pubDate>Sat, 04 Feb 2012 23:55:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[VB]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[read]]></category>
		<category><![CDATA[VBA]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=461</guid>
		<description><![CDATA[<p>This is just example, how to read text file in Visual Basic for Applications (for example, in Excel macro). </p> <p>It&#8217;s just a stub: there is no error processing here, the source file is really text file, no problems with permissions etc.</p> Sub read_from_text_file() txtFile = Application.GetOpenFilename(&#34;Text Files (*.txt), *.txt&#34;) If txtFile = False Then [...]]]></description>
			<content:encoded><![CDATA[<p>This is just example, how to read text file in Visual Basic for Applications (for example, in Excel macro). </p>
<p>It&#8217;s just a stub: there is no error processing here, the source file is really text file, no problems with permissions etc.</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #E56717; font-weight: bold;">Sub</span> read_from_text_file()<br />
<br />
txtFile = Application.GetOpenFilename(<span style="color: #800000;">&quot;Text Files (*.txt), *.txt&quot;</span>)<br />
<span style="color: #8D38C9; font-weight: bold;">If</span> txtFile = <span style="color: #00C2FF; font-weight: bold;">False</span> <span style="color: #8D38C9; font-weight: bold;">Then</span><br />
&nbsp; &nbsp; MsgBox <span style="color: #800000;">&quot;No file to process&quot;</span><br />
&nbsp; &nbsp; <span style="color: #E56717; font-weight: bold;">Exit</span> <span style="color: #E56717; font-weight: bold;">Sub</span><br />
<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span><br />
<br />
<span style="color: #151B8D; font-weight: bold;">Open</span> txtFile <span style="color: #8D38C9; font-weight: bold;">For</span> <span style="color: #151B8D; font-weight: bold;">Input</span> <span style="color: #151B8D; font-weight: bold;">As</span> #1<br />
&nbsp; &nbsp; &nbsp; <span style="color: #151B8D; font-weight: bold;">Input</span> #1, myString<br />
&nbsp; &nbsp; &nbsp; MsgBox myString<br />
<span style="color: #8D38C9; font-weight: bold;">Close</span> #1<br />
&nbsp; &nbsp;<br />
<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Sub</span></div></div>
<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20120205%2Fvba-how-to-read-text-file.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20120205/vba-how-to-read-text-file.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="VBA: how to read text file" data-url="http://www.memosoup.com/20120205/vba-how-to-read-text-file.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20120205/vba-how-to-read-text-file.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the clipboard in WSH</title>
		<link>http://www.memosoup.com/20100126/using-the-clipboard-in-wsh.html</link>
		<comments>http://www.memosoup.com/20100126/using-the-clipboard-in-wsh.html#comments</comments>
		<pubDate>Tue, 26 Jan 2010 13:21:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[VB]]></category>
		<category><![CDATA[clipboard]]></category>
		<category><![CDATA[vbs]]></category>
		<category><![CDATA[wsh]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=252</guid>
		<description><![CDATA[<p>How to get the text from the clipboard</p> set objIE = CreateObject(&#34;InternetExplorer.Application&#34;) objIE.Navigate(&#34;about:blank&#34;) textFromClipboard = objIE.document.parentwindow.clipboardData.GetData(&#34;text&#34;) objIE.Quit WScript.Echo textFromClipboard <p>How to put the text into clipboard</p> textIntoClipboard = &#34;Some text&#34; &#38; VbCrLf &#38; &#34;Some more text&#34; &#160; Set objIE = WScript.CreateObject(&#34;InternetExplorer.Application&#34;) objIE.Navigate &#34;about:blank&#34; Do Until objIE.ReadyState = 4 &#160; &#160; WScript.Sleep 100 Loop &#160; objIE.document.ParentWindow.ClipboardData.SetData [...]]]></description>
			<content:encoded><![CDATA[<p><strong>How to get the text from the clipboard</strong></p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #151B8D; font-weight: bold;">set</span> objIE = <span style="color: #E56717; font-weight: bold;">CreateObject</span>(<span style="color: #800000;">&quot;InternetExplorer.Application&quot;</span>)<br />
objIE.Navigate(<span style="color: #800000;">&quot;about:blank&quot;</span>)<br />
textFromClipboard = objIE.document.parentwindow.clipboardData.GetData(<span style="color: #800000;">&quot;text&quot;</span>)<br />
objIE.Quit<br />
WScript.Echo textFromClipboard</div></div>
<p><strong>How to put the text into clipboard</strong></p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">textIntoClipboard = <span style="color: #800000;">&quot;Some text&quot;</span> &amp; VbCrLf &amp; <span style="color: #800000;">&quot;Some more text&quot;</span><br />
&nbsp;<br />
<span style="color: #151B8D; font-weight: bold;">Set</span> objIE = WScript.<span style="color: #E56717; font-weight: bold;">CreateObject</span>(<span style="color: #800000;">&quot;InternetExplorer.Application&quot;</span>)<br />
objIE.Navigate <span style="color: #800000;">&quot;about:blank&quot;</span><br />
<span style="color: #8D38C9; font-weight: bold;">Do</span> <span style="color: #8D38C9; font-weight: bold;">Until</span> objIE.ReadyState = 4<br />
&nbsp; &nbsp; WScript.Sleep 100<br />
<span style="color: #8D38C9; font-weight: bold;">Loop</span><br />
&nbsp;<br />
objIE.document.ParentWindow.ClipboardData.SetData <span style="color: #800000;">&quot;text&quot;</span>, textIntoClipboard<br />
objIE.Quit</div></div>
<p>The detailed explanation could be <a href="http://www.nilpo.com/2007/08/windows-xp/scripting-the-clipboard-contents-in-wsh/">found here</a>.</p>
<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20100126%2Fusing-the-clipboard-in-wsh.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20100126/using-the-clipboard-in-wsh.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="Using the clipboard in WSH" data-url="http://www.memosoup.com/20100126/using-the-clipboard-in-wsh.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20100126/using-the-clipboard-in-wsh.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Office: check if PowerPoint is running</title>
		<link>http://www.memosoup.com/20091014/office-check-if-powerpoint-is-running.html</link>
		<comments>http://www.memosoup.com/20091014/office-check-if-powerpoint-is-running.html#comments</comments>
		<pubDate>Wed, 14 Oct 2009 09:32:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MS Office]]></category>
		<category><![CDATA[VB]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=202</guid>
		<description><![CDATA[Dim objAPP, sMsg On Error Resume Next Set objAPP = GetObject(, &#34;PowerPoint.Application&#34;) If TypeName(objAPP) = &#34;Empty&#34; Then &#160; &#160; sMsg = &#34;not started&#34; Else &#160; &#160; sMsg = &#34;started&#34; End If MsgBox &#34;PowerPoint is &#34; &#38; sMsg, vbInformation, &#34;PowerPoint&#34; if sMsg = &#34;started&#34; then objAPP.Visible = true Tweet news and informations&#160;automotive,business,crime,health,life,politics,science,technology,travelautomotive,business,crime,health,life,politics,science,technology,travel]]></description>
			<content:encoded><![CDATA[<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #151B8D; font-weight: bold;">Dim</span> objAPP, sMsg<br />
<br />
<span style="color: #151B8D; font-weight: bold;">On</span> <span style="color: #151B8D; font-weight: bold;">Error</span> <span style="color: #151B8D; font-weight: bold;">Resume</span> <span style="color: #8D38C9; font-weight: bold;">Next</span><br />
<br />
<span style="color: #151B8D; font-weight: bold;">Set</span> objAPP = <span style="color: #E56717; font-weight: bold;">GetObject</span>(, <span style="color: #800000;">&quot;PowerPoint.Application&quot;</span>)<br />
<br />
<span style="color: #8D38C9; font-weight: bold;">If</span> TypeName(objAPP) = <span style="color: #800000;">&quot;Empty&quot;</span> <span style="color: #8D38C9; font-weight: bold;">Then</span><br />
&nbsp; &nbsp; sMsg = <span style="color: #800000;">&quot;not started&quot;</span><br />
<span style="color: #8D38C9; font-weight: bold;">Else</span><br />
&nbsp; &nbsp; sMsg = <span style="color: #800000;">&quot;started&quot;</span><br />
<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span><br />
<br />
MsgBox <span style="color: #800000;">&quot;PowerPoint is &quot;</span> &amp; sMsg, vbInformation, <span style="color: #800000;">&quot;PowerPoint&quot;</span> <br />
<br />
<span style="color: #8D38C9; font-weight: bold;">if</span> sMsg = <span style="color: #800000;">&quot;started&quot;</span> <span style="color: #8D38C9; font-weight: bold;">then</span> objAPP.Visible = <span style="color: #00C2FF; font-weight: bold;">true</span></div></div>
<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20091014%2Foffice-check-if-powerpoint-is-running.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20091014/office-check-if-powerpoint-is-running.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="Office: check if PowerPoint is running" data-url="http://www.memosoup.com/20091014/office-check-if-powerpoint-is-running.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20091014/office-check-if-powerpoint-is-running.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WMI: list of the methods and properties</title>
		<link>http://www.memosoup.com/20091009/wmi-list-of-the-methods-and-properties.html</link>
		<comments>http://www.memosoup.com/20091009/wmi-list-of-the-methods-and-properties.html#comments</comments>
		<pubDate>Fri, 09 Oct 2009 15:02:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[VB]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[methods]]></category>
		<category><![CDATA[properties]]></category>
		<category><![CDATA[wmi]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=200</guid>
		<description><![CDATA[strComputer = &#34;.&#34; Set objWMIService=GetObject(&#34;winmgmts:{impersonationLevel=impersonate}!\\&#34; &#38; strComputer &#38; &#34;\root\cimv2&#34;) &#160; For Each objclass in objWMIService.SubclassesOf() &#160; &#160; intCounter=0 &#160; &#160; If Left(objClass.Path_.Class,5) = &#34;Win32&#34; Then &#160; &#160; &#160; &#160; For Each Qualifier in objClass.Qualifiers_ &#160; &#160; &#160; &#160; &#160; &#160; If UCase(Trim(Qualifier.Name)) = &#34;ASSOCIATION&#34; Then &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; intCounter = [...]]]></description>
			<content:encoded><![CDATA[<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">strComputer = <span style="color: #800000;">&quot;.&quot;</span><br />
<span style="color: #151B8D; font-weight: bold;">Set</span> objWMIService=<span style="color: #E56717; font-weight: bold;">GetObject</span>(<span style="color: #800000;">&quot;winmgmts:{impersonationLevel=impersonate}!\\&quot;</span> &amp; strComputer &amp; <span style="color: #800000;">&quot;\root\cimv2&quot;</span>)<br />
&nbsp;<br />
<span style="color: #8D38C9; font-weight: bold;">For</span> <span style="color: #8D38C9; font-weight: bold;">Each</span> objclass <span style="color: #8D38C9; font-weight: bold;">in</span> objWMIService.SubclassesOf()<br />
&nbsp; &nbsp; intCounter=0<br />
&nbsp; &nbsp; <span style="color: #8D38C9; font-weight: bold;">If</span> Left(objClass.Path_.Class,5) = <span style="color: #800000;">&quot;Win32&quot;</span> <span style="color: #8D38C9; font-weight: bold;">Then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #8D38C9; font-weight: bold;">For</span> <span style="color: #8D38C9; font-weight: bold;">Each</span> Qualifier <span style="color: #8D38C9; font-weight: bold;">in</span> objClass.Qualifiers_<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #8D38C9; font-weight: bold;">If</span> UCase(Trim(Qualifier.Name)) = <span style="color: #800000;">&quot;ASSOCIATION&quot;</span> <span style="color: #8D38C9; font-weight: bold;">Then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; intCounter = 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #8D38C9; font-weight: bold;">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #8D38C9; font-weight: bold;">If</span> x = 0 <span style="color: #8D38C9; font-weight: bold;">Then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strComputer = <span style="color: #800000;">&quot;.&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #151B8D; font-weight: bold;">Set</span> objWMIService = <span style="color: #E56717; font-weight: bold;">GetObject</span> _<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (<span style="color: #800000;">&quot;winmgmts:{impersonationLevel=impersonate}!\\&quot;</span> &amp; strComputer &amp; <span style="color: #800000;">&quot;\root\cimv2&quot;</span>)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #151B8D; font-weight: bold;">Set</span> strClass = objWMIService.<span style="color: #151B8D; font-weight: bold;">Get</span>(objClass.Path_.Class)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Wscript.Echo <span style="color: #800000;">&quot;PROPERTIES:&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #8D38C9; font-weight: bold;">For</span> <span style="color: #8D38C9; font-weight: bold;">each</span> strItem <span style="color: #8D38C9; font-weight: bold;">in</span> strClass.properties_<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Wscript.Echo objClass.Path_.Class &amp; vbTab &amp; strItem.name <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #8D38C9; font-weight: bold;">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Wscript.Echo <span style="color: #800000;">&quot;METHODS:&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #8D38C9; font-weight: bold;">For</span> <span style="color: #8D38C9; font-weight: bold;">Each</span> strItem <span style="color: #8D38C9; font-weight: bold;">in</span> strClass.methods_<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Wscript.Echo objClass.Path_.Class &amp; vbTab &amp; strItem.name <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #8D38C9; font-weight: bold;">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span><br />
&nbsp; &nbsp; <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span><br />
<span style="color: #8D38C9; font-weight: bold;">Next</span></div></div>
<p>Other scripts could be found <a href="http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/other/wmi/">here</a></p>
<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20091009%2Fwmi-list-of-the-methods-and-properties.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20091009/wmi-list-of-the-methods-and-properties.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="WMI: list of the methods and properties" data-url="http://www.memosoup.com/20091009/wmi-list-of-the-methods-and-properties.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20091009/wmi-list-of-the-methods-and-properties.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WMI: get the information about the system</title>
		<link>http://www.memosoup.com/20091005/wmi-get-the-information-about-the-system.html</link>
		<comments>http://www.memosoup.com/20091005/wmi-get-the-information-about-the-system.html#comments</comments>
		<pubDate>Mon, 05 Oct 2009 09:40:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[VB]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[vbs]]></category>
		<category><![CDATA[wmi]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=194</guid>
		<description><![CDATA[Option Explicit On Error Resume Next Dim strComputer, objWMIService Dim colItems, objItem strComputer = &#34;.&#34; Set objWMIService = GetObject(&#34;winmgmts:{impersonationLevel=impersonate}!\\&#34; &#38; _ &#160;strComputer &#38; &#34;\root\cimv2&#34;) Set colItems = objWMIService.ExecQuery (&#34;Select * from Win32_OperatingSystem&#34;) For Each objItem in colItems WScript.Echo &#34;Machine Name: &#34; &#38; objItem.CSName &#38; VbCr &#38; _ &#34;===================================&#34; &#38; vbCr &#38; _ &#34;Description: &#34; &#38; [...]]]></description>
			<content:encoded><![CDATA[<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #E56717; font-weight: bold;">Option</span> <span style="color: #E56717; font-weight: bold;">Explicit</span><br />
<span style="color: #151B8D; font-weight: bold;">On</span> <span style="color: #151B8D; font-weight: bold;">Error</span> <span style="color: #151B8D; font-weight: bold;">Resume</span> <span style="color: #8D38C9; font-weight: bold;">Next</span> <br />
<br />
<span style="color: #151B8D; font-weight: bold;">Dim</span> strComputer, objWMIService<br />
<span style="color: #151B8D; font-weight: bold;">Dim</span> colItems, objItem<br />
<br />
strComputer = <span style="color: #800000;">&quot;.&quot;</span><br />
<br />
<span style="color: #151B8D; font-weight: bold;">Set</span> objWMIService = <span style="color: #E56717; font-weight: bold;">GetObject</span>(<span style="color: #800000;">&quot;winmgmts:{impersonationLevel=impersonate}!\\&quot;</span> &amp; _<br />
&nbsp;strComputer &amp; <span style="color: #800000;">&quot;\root\cimv2&quot;</span>)<br />
<br />
<span style="color: #151B8D; font-weight: bold;">Set</span> colItems = objWMIService.ExecQuery (<span style="color: #800000;">&quot;Select * from Win32_OperatingSystem&quot;</span>)<br />
<br />
<span style="color: #8D38C9; font-weight: bold;">For</span> <span style="color: #8D38C9; font-weight: bold;">Each</span> objItem <span style="color: #8D38C9; font-weight: bold;">in</span> colItems<br />
WScript.Echo <span style="color: #800000;">&quot;Machine Name: &quot;</span> &amp; objItem.CSName &amp; VbCr &amp; _ <br />
<span style="color: #800000;">&quot;===================================&quot;</span> &amp; vbCr &amp; _ <br />
<span style="color: #800000;">&quot;Description: &quot;</span> &amp; objItem.Description &amp; VbCr &amp; _ <br />
<span style="color: #800000;">&quot;Manufacturer: &quot;</span> &amp; objItem.Manufacturer &amp; VbCr &amp; _ <br />
<span style="color: #800000;">&quot;Operating System: &quot;</span> &amp; objItem.Caption &amp; VbCr &amp; _ <br />
<span style="color: #800000;">&quot;Version: &quot;</span> &amp; objItem.Version &amp; VbCr &amp; _<br />
<span style="color: #800000;">&quot;Service Pack: &quot;</span> &amp; objItem.CSDVersion &amp; VbCr &amp; _ <br />
<span style="color: #800000;">&quot;CodeSet: &quot;</span> &amp; objItem.CodeSet &amp; VbCr &amp; _ <br />
<span style="color: #800000;">&quot;CountryCode: &quot;</span> &amp; objItem.CountryCode &amp; VbCr &amp; _ <br />
<span style="color: #800000;">&quot;OS Language: &quot;</span> &amp; objItem.OSLanguage &amp; VbCr &amp; _ <br />
<span style="color: #800000;">&quot;CurrentTimeZone: &quot;</span> &amp; objItem.CurrentTimeZone &amp; VbCr &amp; _ <br />
<span style="color: #800000;">&quot;Locale: &quot;</span> &amp; objItem.Locale &amp; VbCr &amp; _ <br />
<span style="color: #800000;">&quot;SerialNumber: &quot;</span> &amp; objItem.SerialNumber &amp; VbCr &amp; _ <br />
<span style="color: #800000;">&quot;SystemDrive: &quot;</span> &amp; objItem.SystemDrive &amp; VbCr &amp; _ <br />
<span style="color: #800000;">&quot;WindowsDirectory: &quot;</span> &amp; objItem.WindowsDirectory &amp; VbCr &amp; _ <br />
<span style="color: #800000;">&quot;&quot;</span><br />
<span style="color: #8D38C9; font-weight: bold;">Next</span></div></div>
<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20091005%2Fwmi-get-the-information-about-the-system.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20091005/wmi-get-the-information-about-the-system.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="WMI: get the information about the system" data-url="http://www.memosoup.com/20091005/wmi-get-the-information-about-the-system.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20091005/wmi-get-the-information-about-the-system.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WMI+VBS: how to get the domain name</title>
		<link>http://www.memosoup.com/20090930/wmivbs-how-to-get-the-domain-name.html</link>
		<comments>http://www.memosoup.com/20090930/wmivbs-how-to-get-the-domain-name.html#comments</comments>
		<pubDate>Wed, 30 Sep 2009 10:21:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[VB]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[vbs]]></category>
		<category><![CDATA[wmi]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=185</guid>
		<description><![CDATA[Option Explicit On Error Resume Next Dim strComputer, objNetwork, objWMIService Dim colItems, objItem Set objNetwork = WScript.CreateObject(&#34;WScript.Network&#34;) strComputer = objNetwork.ComputerName WScript.Echo &#34;Computer = &#34; &#38; strComputer Set objWMIService=GetObject(&#34;winmgmts:{impersonationLevel=impersonate}!\\&#34;&#38;strComputer&#38;&#34;\root\cimv2&#34;) Set colItems = objWMIService.ExecQuery (&#34;Select * from Win32_ComputerSystem&#34;) For Each objItem in colItems &#160;Wscript.Echo &#34;Domain = &#34; &#38; objItem.domain Next <p>There is also WMI FAQ on Microsoft [...]]]></description>
			<content:encoded><![CDATA[<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #E56717; font-weight: bold;">Option</span> <span style="color: #E56717; font-weight: bold;">Explicit</span><br />
<span style="color: #151B8D; font-weight: bold;">On</span> <span style="color: #151B8D; font-weight: bold;">Error</span> <span style="color: #151B8D; font-weight: bold;">Resume</span> <span style="color: #8D38C9; font-weight: bold;">Next</span><br />
<br />
<span style="color: #151B8D; font-weight: bold;">Dim</span> strComputer, objNetwork, objWMIService<br />
<span style="color: #151B8D; font-weight: bold;">Dim</span> colItems, objItem<br />
<br />
<span style="color: #151B8D; font-weight: bold;">Set</span> objNetwork = WScript.<span style="color: #E56717; font-weight: bold;">CreateObject</span>(<span style="color: #800000;">&quot;WScript.Network&quot;</span>)<br />
strComputer = objNetwork.ComputerName<br />
WScript.Echo <span style="color: #800000;">&quot;Computer = &quot;</span> &amp; strComputer<br />
<br />
<span style="color: #151B8D; font-weight: bold;">Set</span> objWMIService=<span style="color: #E56717; font-weight: bold;">GetObject</span>(<span style="color: #800000;">&quot;winmgmts:{impersonationLevel=impersonate}!\\&quot;</span>&amp;strComputer&amp;<span style="color: #800000;">&quot;\root\cimv2&quot;</span>)<br />
<br />
<span style="color: #151B8D; font-weight: bold;">Set</span> colItems = objWMIService.ExecQuery (<span style="color: #800000;">&quot;Select * from Win32_ComputerSystem&quot;</span>)<br />
<span style="color: #8D38C9; font-weight: bold;">For</span> <span style="color: #8D38C9; font-weight: bold;">Each</span> objItem <span style="color: #8D38C9; font-weight: bold;">in</span> colItems<br />
&nbsp;Wscript.Echo <span style="color: #800000;">&quot;Domain = &quot;</span> &amp; objItem.domain<br />
<span style="color: #8D38C9; font-weight: bold;">Next</span></div></div>
<p>There is also <a href="http://www.microsoft.com/technet/scriptcenter/resources/wmifaq.mspx">WMI FAQ</a> on Microsoft site.</p>
<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20090930%2Fwmivbs-how-to-get-the-domain-name.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20090930/wmivbs-how-to-get-the-domain-name.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="WMI+VBS: how to get the domain name" data-url="http://www.memosoup.com/20090930/wmivbs-how-to-get-the-domain-name.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20090930/wmivbs-how-to-get-the-domain-name.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MS Word: replace spaces to non-breaking</title>
		<link>http://www.memosoup.com/20090928/ms-word-replace-spaces-to-non-breaking.html</link>
		<comments>http://www.memosoup.com/20090928/ms-word-replace-spaces-to-non-breaking.html#comments</comments>
		<pubDate>Mon, 28 Sep 2009 10:57:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MS Office]]></category>
		<category><![CDATA[VB]]></category>
		<category><![CDATA[space]]></category>
		<category><![CDATA[word]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=183</guid>
		<description><![CDATA[<p>To insert it manually, use Ctrl+Shift+Space</p> Selection.HomeKey Unit:=wdStory Selection.Find.ClearFormatting Selection.Find.Style = ActiveDocument.Styles(&#34;Normal&#34;) Selection.Find.Replacement.ClearFormatting With Selection.Find &#160; &#160;.Text = &#34; &#160; &#34; &#160; &#160;.Replacement.Text = &#34;^s&#34; &#160; &#160;.Forward = True &#160; &#160;.Wrap = wdFindContinue &#160; &#160;.Format = True End With Selection.Find.Execute Replace:=wdReplaceAll Tweet news and informations&#160;automotive,business,crime,health,life,politics,science,technology,travelautomotive,business,crime,health,life,politics,science,technology,travel]]></description>
			<content:encoded><![CDATA[<p>To insert it manually, use <strong>Ctrl+Shift+Space</strong></p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Selection.HomeKey Unit:=wdStory<br />
Selection.Find.ClearFormatting<br />
Selection.Find.Style = ActiveDocument.Styles(<span style="color: #800000;">&quot;Normal&quot;</span>)<br />
Selection.Find.Replacement.ClearFormatting<br />
<span style="color: #8D38C9; font-weight: bold;">With</span> Selection.Find<br />
&nbsp; &nbsp;.Text = <span style="color: #800000;">&quot; &nbsp; &quot;</span><br />
&nbsp; &nbsp;.Replacement.Text = <span style="color: #800000;">&quot;^s&quot;</span><br />
&nbsp; &nbsp;.Forward = <span style="color: #00C2FF; font-weight: bold;">True</span><br />
&nbsp; &nbsp;.Wrap = wdFindContinue<br />
&nbsp; &nbsp;.Format = <span style="color: #00C2FF; font-weight: bold;">True</span><br />
<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">With</span><br />
Selection.Find.Execute Replace:=wdReplaceAll</div></div>
<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20090928%2Fms-word-replace-spaces-to-non-breaking.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20090928/ms-word-replace-spaces-to-non-breaking.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="MS Word: replace spaces to non-breaking" data-url="http://www.memosoup.com/20090928/ms-word-replace-spaces-to-non-breaking.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20090928/ms-word-replace-spaces-to-non-breaking.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

