Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / May 2007

Tip: Looking for answers? Try searching our database.

Populating Repeating Table with VB Script

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Charles Simpson - 22 May 2007 22:03 GMT
Hello Everyone!

I'm using InfoPath 2007 client.  I'd like to place a button on the form to
populate a repeating table using the following script:

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile("c:\scripts\TEWIW001-Software.tsv",
True)

strComputer = "TEWIW001"
Set objWMIService = GetObject("winmgmts:" _
   & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSoftware = objWMIService.ExecQuery _
   ("Select * from Win32_Product")

objTextFile.WriteLine "Vendor" & vbtab & _
   "Name" & vbtab & "Version" & vbtab & _
   "Install State" & vbtab & "Install Date" & vbtab & _
   "Install Location"

For Each objSoftware in colSoftware
   objTextFile.WriteLine objSoftware.Vendor & vbtab & _
   objSoftware.Name & vbtab & _
   objSoftware.Version & vbtab & _
   objSoftware.InstallState & vbtab & _
   objSoftware.InstallDate & vbtab & _
   objSoftware.InstallLocation
Next
objTextFile.Close

The vb script above currently writes the results to a csv file stored on the
local computer.  I'd like for it to run when the button on the form is
executed and to populate a repeating table on the form instead of creating a
csv file.

Thanks!
Charles Simpson - 23 May 2007 15:01 GMT
does anyone have a clue?

> Hello Everyone!
>
[quoted text clipped - 32 lines]
>
> Thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.