 




<?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>IT Answers &#187; VBScript</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/tag/vbscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers</link>
	<description></description>
	<lastBuildDate>Sun, 19 May 2013 19:08:42 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Reading a value from HKLM registry and writing it HKLM registry</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/reading-a-value-from-hklm-registry-and-writing-it-hklm-registry/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/reading-a-value-from-hklm-registry-and-writing-it-hklm-registry/#comments</comments>
		<pubDate>Tue, 04 Dec 2012 19:21:33 +0000</pubDate>
		<dc:creator>raf1234</dc:creator>
				<category><![CDATA[VBScript]]></category>
		<category><![CDATA[VBScript Functions]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/?p=273598</guid>
		<description><![CDATA[New Answer by Harisheldon]]></description>
				<content:encoded><![CDATA[New Answer by Harisheldon]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/reading-a-value-from-hklm-registry-and-writing-it-hklm-registry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VBscript to send email on service failure</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/vbscript-to-send-email-on-service-failure/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/vbscript-to-send-email-on-service-failure/#comments</comments>
		<pubDate>Tue, 21 Aug 2012 16:19:08 +0000</pubDate>
		<dc:creator>vzvzxvcx</dc:creator>
				<category><![CDATA[Email]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[windows 2003]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/vbscript-to-send-email-on-service-failure/</guid>
		<description><![CDATA[New Discussion Post by carlosdl]]></description>
				<content:encoded><![CDATA[New Discussion Post by carlosdl]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/vbscript-to-send-email-on-service-failure/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Select Statement &amp; Where Clause &#8230;.</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/select-statement-where-clause/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/select-statement-where-clause/#comments</comments>
		<pubDate>Wed, 11 Jul 2012 15:31:51 +0000</pubDate>
		<dc:creator>JKJK</dc:creator>
				<category><![CDATA[ASP]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[VBScript]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/select-statement-where-clause/</guid>
		<description><![CDATA[New Answer by JKJK]]></description>
				<content:encoded><![CDATA[New Answer by JKJK]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/select-statement-where-clause/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Instring function using vbscript</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/instring-function-using-vbscript/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/instring-function-using-vbscript/#comments</comments>
		<pubDate>Fri, 15 Jun 2012 14:30:27 +0000</pubDate>
		<dc:creator>Muniraja</dc:creator>
				<category><![CDATA[VBScript]]></category>
		<category><![CDATA[VBScript Functions]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[how to extract the comma till the last and display only the last value suppose if i insert 100000 rows it should show 100000 not like from 1,2,3, till 100000 it should extract till last comma please help me]]></description>
				<content:encoded><![CDATA[<p>how to extract the comma till the last and display only the last value suppose if i insert 100000 rows it should show 100000 not like from 1,2,3, till 100000 it should extract till last comma please help me</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/instring-function-using-vbscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extract Data from SAP using VBScript</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/extract-data-from-sap-using-vbscript/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/extract-data-from-sap-using-vbscript/#comments</comments>
		<pubDate>Mon, 21 May 2012 20:20:54 +0000</pubDate>
		<dc:creator>Torontog1</dc:creator>
				<category><![CDATA[SAP]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[VBScript Debugging]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hi,   I am trying to extract data out of SAP using VBScript. I remember this worked earlier, but ever since we upgraded to VB7, I am getting an error. Can you please look into this?   code: Dim R3, MyFunc, App, objFileSystemObject, filOutput, objmessage As Object Dim nTotalRecords As Long &#8216; Define the objects [...]]]></description>
				<content:encoded><![CDATA[<p>Hi,<br/><br/>  <br/><br/> I am trying to extract data out of SAP using VBScript. I remember this worked earlier, but ever since we upgraded to VB7, I am getting an error. Can you please look into this? <br/><br/>  <br/><br/> code: <br/><br/> Dim R3, MyFunc, App, objFileSystemObject, filOutput, objmessage As Object <br/><br/> Dim nTotalRecords As Long <br/><br/> &#8216; Define the objects to hold IMPORT parameters <br/><br/> Dim QUERY_TABLE As Object <br/><br/> Dim DELIMITER As Object <br/><br/> Dim NO_DATA As Object <br/><br/> Dim ROWSKIPS As Object <br/><br/> Dim ROWCOUNT As Object <br/><br/>  <br/><br/> &#8216; Define the objects to hold the EXPORT parameters <br/><br/> &#8216; None for RFC_TABLE_READ <br/><br/>  <br/><br/> &#8216; Define the objects to hold the TABLES parameters <br/><br/> &#8216; Where clause <br/><br/> Dim OPTIONS As Object <br/><br/> &#8216; Fill with fields to return. After function call will hold <br/><br/> &#8216; detailed information about the columns of data (start position <br/><br/> &#8216; of each field, length, etc. <br/><br/> Dim FIELDS As Object <br/><br/> &#8216; Holds the data returned by the function <br/><br/> Dim tDATA As Object <br/><br/>  <br/><br/> &#8216; Use to write out results <br/><br/> Dim ROW As Object <br/><br/>  <br/><br/> Dim Result As Boolean <br/><br/> Dim iRow, iColumn, iStart, iStartRow, iField, iLength As Integer <br/><br/> Dim var_return As String <br/><br/> Public Function RFC_READ_TABLE_MARA()   &#8216;********************************************** &#8216;Create Server object and Setup the connection &#8216;********************************************** Set objFileSystemObject = CreateObject(&#8220;Scripting.FileSystemObject&#8221;  attachpath1 = &#8220;C:ExtractsMARA.rtf&#8221;   Set R3 = CreateObject(&#8220;SAP.Functions&#8221;)   R3.Connection.system = &#8220;xxx&#8221; R3.Connection.SystemNumber = &#8220;xxx&#8221; R3.Connection.client = &#8220;xxx&#8221; R3.Connection.User = &#8220;xxx&#8221; R3.Connection.Password = &#8220;XXX&#8221; R3.Connection.language = &#8220;EN&#8221; R3.Connection.applicationserver = &#8220;XXX&#8221;   If R3.Connection.logon(0, True) &lt;&gt; True Then MsgBox &#8220;No connection to R3!&#8221; var_return = &#8221; has Failed&#8221; sendmessage (var_return)   Exit Function End If   &#8216;***************************************************** &#8216;Call RFC function RFC_READ_TABLE &#8216;*****************************************************     Set MyFunc = R3.Add(&#8220;RFC_READ_TABLE&#8221;)     ERROR RECEIVED IS: Run-time error &#8216;-2147352568&#8242; Bad variant type Thank you <br/><br/></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/extract-data-from-sap-using-vbscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Set Page orientation</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/set-page-orientation/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/set-page-orientation/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 15:35:57 +0000</pubDate>
		<dc:creator>ConFlicker</dc:creator>
				<category><![CDATA[VBScript]]></category>
		<category><![CDATA[VBScript Functions]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Can anyone help identify how to set the Page Layout Orientation of an XLSX file in VBS?  I am using the below script example for reference. Set obj = CreateObject("Excel.Application") Set objWorkbook = obj.Workbooks.Open("C:pathtest.xlsx") obj.ActiveSheet.PageSetup.Orientation = xlLandscape obj.ActiveWorkbook.Saveas "C:pathtest.xlsx" obj.ActiveWorkbook.Close Thank you.]]></description>
				<content:encoded><![CDATA[<p>Can anyone help identify how to set the Page Layout Orientation of an XLSX file in VBS?  I am using the below script example for reference.<br/><br/>
<pre>Set obj = CreateObject("Excel.Application") Set objWorkbook = obj.Workbooks.Open("C:pathtest.xlsx") obj.ActiveSheet.PageSetup.Orientation = xlLandscape obj.ActiveWorkbook.Saveas "C:pathtest.xlsx" obj.ActiveWorkbook.Close</pre>
<p><br/><br/> Thank you.<br/><br/></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/set-page-orientation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Autoprint to PDF Printer</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/autoprint-to-pdf-printer/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/autoprint-to-pdf-printer/#comments</comments>
		<pubDate>Tue, 20 Mar 2012 14:30:05 +0000</pubDate>
		<dc:creator>ConFlicker</dc:creator>
				<category><![CDATA[VBScript]]></category>
		<category><![CDATA[VBScript Functions]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Does anyone know if there is a script (VBS, BAT or otherwise) that will send a requested file (xls, doc, txt) to a local installed PDF printer and render it without user intervention?]]></description>
				<content:encoded><![CDATA[<p>Does anyone know if there is a script (VBS, BAT or otherwise) that will send a requested file (xls, doc, txt) to a local installed PDF printer and render it without user intervention?</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/autoprint-to-pdf-printer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VBS output to text</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/vbs-output-to-text/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/vbs-output-to-text/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 22:30:25 +0000</pubDate>
		<dc:creator>ConFlicker</dc:creator>
				<category><![CDATA[VBScript]]></category>
		<category><![CDATA[VBScript Functions]]></category>
		<category><![CDATA[VBScript Statements]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[New Answer by Michael Tidmarsh]]></description>
				<content:encoded><![CDATA[New Answer by Michael Tidmarsh]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/vbs-output-to-text/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Verify NTP</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/verify-ntp/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/verify-ntp/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 01:00:49 +0000</pubDate>
		<dc:creator>JCL</dc:creator>
				<category><![CDATA[VBScript]]></category>
		<category><![CDATA[Windows Server 2003]]></category>
		<category><![CDATA[Windows XP]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[VBScript to verify a NTP Time source]]></description>
				<content:encoded><![CDATA[<p>VBScript to verify a NTP Time source</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/verify-ntp/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>VBS to Remotely Make a copy of a File on Multiple Systems</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/vbs-to-remotely-make-a-copy-of-a-file-on-multiple-systems/</link>
		<comments>http://itknowledgeexchange.techtarget.com/itanswers/vbs-to-remotely-make-a-copy-of-a-file-on-multiple-systems/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 18:18:49 +0000</pubDate>
		<dc:creator>Blackbird21</dc:creator>
				<category><![CDATA[VBScript]]></category>
		<category><![CDATA[Visual Basic Script]]></category>
		<category><![CDATA[Windows Server 2003]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hello, I&#8217;m trying to edit a vbs script that I found online to help me remotely connect to a few servers (using a servers.txt file) and make a copy of a specific file called test.txt (it’s the same file name and path on all servers but with different configuration for each server) and add the [...]]]></description>
				<content:encoded><![CDATA[<p>Hello, I&#8217;m trying to edit a vbs script that I found online to help me remotely connect to a few servers (using a servers.txt file) and make a copy of a specific file called test.txt (it’s the same file name and path on all servers but with different configuration for each server) and add the date to the file name (test_todays data.txt) but not overwrite the previous days file. I’m also trying to copy that test_date.txt file to a staging folder on the same directory to make some changes to it. Thank you, David <br/><br/> Dim oFSO, sCList, sComputer, sWinDir, colOperatingSystems, oOperatingSystem Dim oWMIService, Error, sWinDirRaw, fso, drv, str Const ForReading = 1 Const OverwriteExisting = True &#8216;Get computers &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; Set oFSO = CreateObject(&#8220;Scripting.FileSystemObject&#8221;) Set sCList = oFSO.OpenTextFile(&#8220;c:scriptsservers.txt&#8221;) Do Until sCList.AtEndOfStream sComputer = sCList.ReadLine &#8216;Get WinDir name &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; Set oWMIService = GetObject(&#8220;winmgmts:\\&#8221; &#038; sComputer) Set colOperatingSystems = oWMIService.InstancesOf(&#8220;Win32_OperatingSystem&#8221;) For Each oOperatingSystem In colOperatingSystems sWinDirRaw = oOperatingSystem.WindowsDirectory sWinDir = StripDriveInfo(sWinDirRaw) Next &#8216;If test.txt exists, make a backup copy named test_todaysdate.txt &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; If oFSO.FileExists(&#8220;\\&#8221; &#038; sComputer &#038; &#8220;d$&#8221; &#038; sWinDir &#038; &#8220;ABCMy SystemTestConftest.txt&#8221;) Then oFSO.CopyFile &#8220;\\&#8221; &#038; sComputer &#038; _ &#8220;d$&#8221; &#038; sWinDir &#038; &#8220;ABCMy SystemTestConftest.txt&#8221;, &#8220;\\&#8221; &#038; sComputer &#038; _ &#8220;d$&#8221; &#038; sWinDir &#038; &#8220;ABCMy SystemTestConftest_20110907.txt&#8221; End If &#8216;Copy tests file &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; oFSO.CopyFile &#8220;d$ABCMy SystemTestConftest_20110907.txt&#8221;, &#8220;\\&#8221; &#038; sComputer &#038;_ &#8220;d$&#8221; &#038; sWinDir &#038; &#8220;ABCMy SystemTestConfstagingtest_20110907.txt&#8221;, OverwriteExisting If Error &lt;&gt; 0 Then WScript.Echo &#8220;Error copying file to &#8221; &#038; sComputer Else WScript.Echo &#8220;Finished script On &#8221; &#038; sComputer WScript.Echo &#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#8221; End If Loop sCList.Close WScript.Echo &#8220;Finished Updates on all computers&#8221; MsgBox (&#8220;Exit?&#8221;) Function StripDriveInfo(path) &#8216;Set fso = CreateObject(&#8220;Scripting.FileSystemObject&#8221;) drv = oFSO.GetDriveName(path) If Len(drv) &gt;0 Then str = Mid(path, Len(drv) + 2) Else str = path End If StripDriveInfo = str End Function<br/><br/></p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/itanswers/vbs-to-remotely-make-a-copy-of-a-file-on-multiple-systems/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/22 queries in 0.024 seconds using memcached
Object Caching 888/1001 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-19 23:24:23 -->