PDA

View Full Version : Solved: vbs creates .xml from folders - how to run excel macro at end



mperrah
05-23-2012, 11:27 AM
I found this code that scans through all folders and sub folders and generates an xml file. Then got help turning that xml data into an excel file that can be saved as html. (Thank you mohanvijay (http://www.vbaexpress.com/forum/member.php?u=36127)) :hi:
To run this .VBS script I just double click from windows explorer.
How can I combine the excel vba with this .vbs file to do both processes in one step?


Option Explicit
Const strFolderDefault = "C:\Documents and Settings\markymark\Desktop\Right To Know"
Const blnGetFilesTooDefault = False
Dim strFolder, blnGetFilesToo
strFolder = InputBox("Enter the folder to index", "Folder", strFolderDefault)
blnGetFilesToo = (MsgBox("Would you like to index files in addition to folders?", vbYesNo) = vbYes)
Dim gobjDoc, gobjFso
Dim objRootFolderNode
Set gobjFso = CreateObject("Scripting.FileSystemObject")
Set gobjDoc = CreateObject("Microsoft.XMLDOM")
Set gobjDoc.DocumentElement = GetFolderElement(strFolder, strFolder, blnGetFilesToo)
gobjDoc.Save "MSDS_vbaExpress_01.xml"
Set gobjFso = Nothing
Set gobjDoc = Nothing
MsgBox "Done"

Function GetFolderElement(vstrFolderRoot, vstrName, vblnGetFilesToo)

Dim objFolderRoot, objFolderCur, objFolderElement, objAttribute
Dim objFileCur, objFileElement
Set objFolderRoot = gobjFso.GetFolder(vstrFolderRoot)
Set objFolderElement = gobjDoc.createElement("folder")
Set objAttribute = gobjDoc.createAttribute("name")
objAttribute.Value = vstrName
objFolderElement.Attributes.setNamedItem objAttribute
On Error Resume Next
For Each objFolderCur In objFolderRoot.SubFolders
objFolderElement.appendChild GetFolderElement(objFolderCur.Path, objFolderCur.Name, vblnGetFilesToo)
Next
If vblnGetFilesToo Then
For Each objFileCur In objFolderRoot.Files
Set objFileElement = gobjDoc.createElement("file")
objFileElement.setAttribute "name", objFileCur.Name
objFileElement.setAttribute "type", objFileCur.Type
objFileElement.setAttribute "path", objFileCur.Path
objFolderElement.appendChild objFileElement
Next
End If
Set GetFolderElement = objFolderElement
Set objAttribute = Nothing
Set objFolderRoot = Nothing
Set objFolderCur = Nothing
Set objFolderElement = Nothing
Set objFileCur = Nothing
Set objFileElement = Nothing
End Function

' start excel stuff here...
' open excel run macro


excel code is here.. file name MSDS_vbaexpress_001_good.xlsm


Sub ConvertDataToHTMLSheet()
Dim WS_Data As Worksheet
Dim L_Row As Long
Dim T_Rng As Range
Dim T_Str As String
Dim i As Long
Dim ii As Integer
Dim Hld_Sh() As String

Set WS_Data = ThisWorkbook.Worksheets("Data")
Application.ScreenUpdating = False
With WS_Data

If .FilterMode = True Then .ShowAllData

L_Row = .Cells(Rows.Count, 1).End(xlUp).Row

.Range("a1:a" & L_Row).Copy .Range("f1")

.Range("f1:f" & L_Row).AdvancedFilter xlFilterInPlace, , , True

For Each T_Rng In .Range("f2:f" & L_Row).SpecialCells(xlCellTypeVisible)
T_Str = T_Str & T_Rng.Value & ";;"
Next

T_Str = Left(T_Str, Len(T_Str) - 2)


Set T_Rng = Nothing
' .ShowAllData

Range("f1").EntireColumn.Delete
Hld_Sh = Split(T_Str, ";;")

Dim T_WS As Worksheet

On Error Resume Next
Application.DisplayAlerts = False

For ii = 0 To UBound(Hld_Sh)
Set T_WS = ThisWorkbook.Worksheets(Hld_Sh(ii))
If Not T_WS Is Nothing Then T_WS.Delete

Set T_WS = ThisWorkbook.Worksheets.Add
T_WS.Name = Hld_Sh(ii)
Set T_WS = Nothing
Next ii

On Error GoTo 0
Application.DisplayAlerts = True

For ii = 0 To UBound(Hld_Sh)
ThisWorkbook.Worksheets(Hld_Sh(ii)).Range("a1:g1").Value = _
Array("<html>", "<head>", "<title>" & Hld_Sh(ii) & " MSDS</title>", "</head>", _
"<body>", "<h1>" & Hld_Sh(ii) & " MSDS</h1>", "<table>")

ThisWorkbook.Worksheets(Hld_Sh(ii)).Range("a1:g1").Copy
ThisWorkbook.Worksheets(Hld_Sh(ii)).Range("a2").PasteSpecial Transpose:=True
Application.CutCopyMode = False
ThisWorkbook.Worksheets(Hld_Sh(ii)).Range("a1").EntireRow.Delete
Next ii


Dim P_Res As String
Dim P_WsName
Dim S_LRW As Long
Dim Cr_1 As String
Dim Cr_2 As String

For i = 2 To L_Row

Cr_2 = .Range("c" & i).Value
Cr_2 = Right(Cr_2, Len(Cr_2) - InStrRev(Cr_2, "\"))
Cr_1 = .Range("b" & i).Value
T_Str = .Range("a" & i).Value

P_Res = "<tr><td><a href=""" & T_Str & "\"

P_Res = P_Res & Cr_1 & "\" & Cr_2 & """ alt="""

P_Res = P_Res & Cr_1 & """>" & Cr_1 & "</a></td</tr>"

S_LRW = ThisWorkbook.Worksheets(T_Str).Cells(Rows.Count, 1).End(xlUp).Row + 1
ThisWorkbook.Worksheets(T_Str).Cells(S_LRW, 1).Value = P_Res

Next i

For ii = 0 To UBound(Hld_Sh)
T_Str = Hld_Sh(ii)
S_LRW = ThisWorkbook.Worksheets(T_Str).Cells(Rows.Count, 1).End(xlUp).Row + 1
ThisWorkbook.Worksheets(T_Str).Range("a" & S_LRW).Value = "</table>"
ThisWorkbook.Worksheets(T_Str).Range("a" & S_LRW + 1).Value = "</body>"
ThisWorkbook.Worksheets(T_Str).Range("a" & S_LRW + 2).Value = "</html>"
Next ii

End With

' Application.ScreenUpdating = False

' With ThisWorkbook.Worksheets("Data")
' If .FilterMode = True Then .ShowAllData
' End With

Set WS_Data = Nothing

Application.ScreenUpdating = True

End Sub


Thank you for all the help. This forum is Awesome

Bob Phillips
05-23-2012, 12:12 PM
VBScript has no concept of ThisWorkbook as it is not hosted. You would need to start Excel up, or access an Excel instance, open the workbook, or see if it is opne, and work on that.

Why don't you do it the other way around, embed the VBS within VBA?

mperrah
05-23-2012, 12:27 PM
that would be cool. I dont mind running the script from within excel. I'm just sure what i need to alter the .vbs file to work that way. I tried pasting into a module and running it but it errors out.
Do you have a work around Bob?

mperrah
05-23-2012, 03:05 PM
ive tried this and the first part starts ok, but the second part (still function) throws error: object not defined
on :

Function GetFolderElement(vstrFolderRoot, vstrName, vblnGetFilesToo)

Dim objFolderRoot, objFolderCur, objFolderElement, objAttribute
Dim objFileCur, objFileElement
Set gobjFso = CreateObject("Scripting.FileSystemObject")


Option Explicit

Sub buildxmlfromfolders() ' added to make vbs to vba ?

Const strFolderDefault = "C:\Documents and Settings\markymark\Desktop\Right To Know"
Const blnGetFilesTooDefault = False
Dim strFolder, blnGetFilesToo
strFolder = InputBox("Enter the folder to index", "Folder", strFolderDefault)
blnGetFilesToo = (MsgBox("Would you like to index files in addition to folders?", vbYesNo) = vbYes)
Dim gobjDoc, gobjFso
Dim objRootFolderNode
Set gobjFso = CreateObject("Scripting.FileSystemObject")
Set gobjDoc = CreateObject("Microsoft.XMLDOM")
Set gobjDoc.DocumentElement = GetFolderElement(strFolder, strFolder, blnGetFilesToo)
gobjDoc.Save "MSDS_vbaExpress_01.xml"
Set gobjFso = Nothing
Set gobjDoc = Nothing
MsgBox "Done"

End Sub ' added to make vbs to vba ?


Function GetFolderElement(vstrFolderRoot, vstrName, vblnGetFilesToo)

Dim objFolderRoot, objFolderCur, objFolderElement, objAttribute
Dim objFileCur, objFileElement
Set gobjFso = CreateObject("Scripting.FileSystemObject")
Set objFolderRoot = gobjFso.GetFolder(vstrFolderRoot)
Set objFolderElement = gobjDoc.createElement("folder")
Set objAttribute = gobjDoc.createAttribute("name")
objAttribute.Value = vstrName
objFolderElement.Attributes.setNamedItem objAttribute
On Error Resume Next
For Each objFolderCur In objFolderRoot.SubFolders
objFolderElement.appendChild GetFolderElement(objFolderCur.Path, objFolderCur.Name, vblnGetFilesToo)
Next
If vblnGetFilesToo Then
For Each objFileCur In objFolderRoot.Files
Set objFileElement = gobjDoc.createElement("file")
objFileElement.setAttribute "name", objFileCur.Name
objFileElement.setAttribute "type", objFileCur.Type
objFileElement.setAttribute "path", objFileCur.Path
objFolderElement.appendChild objFileElement
Next
End If
Set GetFolderElement = objFolderElement
Set objAttribute = Nothing
Set objFolderRoot = Nothing
Set objFolderCur = Nothing
Set objFolderElement = Nothing
Set objFileCur = Nothing
Set objFileElement = Nothing
Set gobjFso = Nothing
End Function

Bob Phillips
05-23-2012, 03:09 PM
I am sure we can work it out.

What does the VBA do? I have had a brief look, but cannot see its relationship to the XML file that the VBS creates.

Another question, why do you want XML, as against just getting that data into an array?

Bob Phillips
05-23-2012, 03:11 PM
ive tried this and the first part starts ok, but the second part (still function) throws error: object not defined
on :

Function GetFolderElement(vstrFolderRoot, vstrName, vblnGetFilesToo)

Dim objFolderRoot, objFolderCur, objFolderElement, objAttribute
Dim objFileCur, objFileElement
Set gobjFso = CreateObject("Scripting.FileSystemObject")


Option Explicit

Sub buildxmlfromfolders() ' added to make vbs to vba ?

Const strFolderDefault = "C:\Documents and Settings\markymark\Desktop\Right To Know"
Const blnGetFilesTooDefault = False
Dim strFolder, blnGetFilesToo

strFolder = InputBox("Enter the folder to index", "Folder", strFolderDefault)
blnGetFilesToo = (MsgBox("Would you like to index files in addition to folders?", vbYesNo) = vbYes)
Dim gobjDoc, gobjFso
Dim objRootFolderNode
Set gobjFso = CreateObject("Scripting.FileSystemObject")
Set gobjDoc = CreateObject("Microsoft.XMLDOM")
Set gobjDoc.DocumentElement = GetFolderElement(strFolder, strFolder, blnGetFilesToo)
gobjDoc.Save "MSDS_vbaExpress_01.xml"
Set gobjFso = Nothing
Set gobjDoc = Nothing
MsgBox "Done"

End Sub ' added to make vbs to vba ?

That's the easy bit, but see my other post.

Option Explicit

Public gobjDoc As Object, gobjFso As Object

Sub buildxmlfromfolders()

Const strFolderDefault = "C:\Documents and Settings\markymark\Desktop\Right To Know"
Const blnGetFilesTooDefault = False
Dim strFolder, blnGetFilesToo
strFolder = InputBox("Enter the folder to index", "Folder", strFolderDefault)
blnGetFilesToo = (MsgBox("Would you like to index files in addition to folders?", vbYesNo) = vbYes)
Dim gobjDoc, gobjFso
Dim objRootFolderNode
Set gobjFso = CreateObject("Scripting.FileSystemObject")
Set gobjDoc = CreateObject("Microsoft.XMLDOM")
Set gobjDoc.DocumentElement = GetFolderElement(strFolder, strFolder, blnGetFilesToo)
gobjDoc.Save "MSDS_vbaExpress_01.xml"
Set gobjFso = Nothing
Set gobjDoc = Nothing
MsgBox "Done"

End Sub

mperrah
05-23-2012, 03:46 PM
I would love the whole project to run in excel excelusivley
but i could not find a script to get file names from subfolders in excel.
I have a folder (MSDS) with 4 subfolders: 400 Warehouse, 500 Warehouse, Reliante Warehouse and Shop
each of the 4 subfolders get new msds sheets added when we make new products ,
the pdf file is put in a new subfolder with a similar name as the product, but structure is the unchanging.
I plan to have a web page that each warehouse can access a current list of the MSDS sheets in use.
With a link to the pdf file, all to be stored locally on a tablet in each warehouse respectively.
The VBS file scans the folders and subfolders and creates a XML file with Name, Location and Path info
I then import the xml to excel and name the sheet "Data" and run the vba code
which looks in coloumn "A" for unique entries (there are only 4 and will always be those 4)
and for each row of matching data the script copies the data and combines with html tags in an array to make a list of links
Including header and title info for each page(worksheet), and names each new sheet based on the warehouse name.
I then copy and past the result into notepad and save as html (this could be automated as well...)

mperrah
05-23-2012, 03:55 PM
this is the rest of the vbs file. tried piecing parts in to declarations but it throws error still:
path not found - on bold italic section

Function GetFolderElement(vstrFolderRoot, vstrName, vblnGetFilesToo)

Dim gobjDoc As Object, gobjFso As Object
Dim objFolderRoot, objFolderCur, objFolderElement, objAttribute
Dim objFileCur, objFileElement
Set gobjFso = CreateObject("Scripting.FileSystemObject")
Set gobjDoc = CreateObject("Microsoft.XMLDOM")
Set objFolderRoot = gobjFso.GetFolder(vstrFolderRoot)
Set objFolderElement = gobjDoc.createElement("folder")
Set objAttribute = gobjDoc.createAttribute("name")
objAttribute.Value = vstrName
objFolderElement.Attributes.setNamedItem objAttribute
On Error Resume Next
For Each objFolderCur In objFolderRoot.SubFolders
objFolderElement.appendChild GetFolderElement(objFolderCur.Path, objFolderCur.Name, vblnGetFilesToo)
Next
If vblnGetFilesToo Then
For Each objFileCur In objFolderRoot.Files
Set objFileElement = gobjDoc.createElement("file")
objFileElement.setAttribute "name", objFileCur.Name
objFileElement.setAttribute "type", objFileCur.Type
objFileElement.setAttribute "path", objFileCur.Path
objFolderElement.appendChild objFileElement
Next
End If
Set GetFolderElement = objFolderElement
Set objAttribute = Nothing
Set objFolderRoot = Nothing
Set objFolderCur = Nothing
Set objFolderElement = Nothing
Set objFileCur = Nothing
Set objFileElement = Nothing
Set gobjFso = Nothing
End Function

Bob Phillips
05-23-2012, 04:17 PM
I would rather use a VBA routine to grab the data into an array and process that.

But two questions.

1. Does it just get all files in all subfolders, or some specific files?

2. What should the output look like?

mperrah
05-23-2012, 04:32 PM
1.
the folders only have pdf files in them and they only go 3 levels deep, like: MSDS/warehousename(s)/pdfName(s)/pdfFile.pdf - [none have () though]

2.
as far as structure, the middle step can be eliminated altogether if you can scan folders and subfolders, take the results, make a sheet of basically a link to each sub file and out put as html (or text, i can change 4 file names easy enough)

I'm looking as an end result of the scan to have 4 html files.
Each of the 4 files are a html page with a table list of files/links to the pdf doc's
The names of the pdf files are the link names
And the 4 Html files are named the 1st sub folder name under "MSDS" folder which are the 4 warehouse location names.

I dont need xml. or even an excel output if we can go straight to the out put html - great.
If I open a file and run a macro from a command button or ALT F8 to the macro name is fine. (Awesome actually)

Thanks for your attention Bob

mperrah
05-23-2012, 04:35 PM
here is the file with the data sheet how it imports in and the html looking results after the macro runs...

mperrah
05-23-2012, 07:16 PM
oops. just double checked the file attached. run the convert macro
and it builds the other sheets. forgot I deleted them to test the macro...

Bob Phillips
05-24-2012, 12:58 AM
Okay, I am goin g to start again from the beginning, put up a strawman, and you can tell me what you want changed.

This code creates an HTML page list of all of the files

Public Sub BuildFileHTML()
Const BASE_FOLDER As String = "C:\Temp"
Dim ws As Worksheet
Dim fso As Object
Dim fldr As Object
Dim mtxFiles As Variant
Dim filenumber As Long
Dim nextrow As Long
Dim i As Long

Application.ScreenUpdating = False

ReDim mtxFiles(1 To 2, 1 To 1)

Set fso = CreateObject("Scripting.FilesystemObject")
Set fldr = fso.GetFolder(BASE_FOLDER)
Call GetFiles(mtxFiles, fldr, nextrow)

filenumber = FreeFile
Open "Files.html" For Output As #filenumber
For i = LBound(mtxFiles, 2) To UBound(mtxFiles, 2)

Print #filenumber, "<p><a href=""" & mtxFiles(1, i) & """>" & mtxFiles(2, i) & "</p>"
Next i
Close #filenumber

Set fldr = Nothing
Set fso = Nothing

Application.ScreenUpdating = True
End Sub

Private Function GetFiles(ByRef fileList As Variant, ByVal fldr As Object, ByRef nextrow As Long)
Dim file As Object
Dim subfolder As Object

For Each file In fldr.Files

nextrow = nextrow + 1
ReDim Preserve fileList(1 To 2, 1 To nextrow)
fileList(1, nextrow) = file.Path
fileList(2, nextrow) = file.Name
Next file

For Each subfolder In fldr.subfolders

Call GetFiles(fileList, subfolder, nextrow)
Next subfolder
End Function

mperrah
05-24-2012, 08:42 AM
Wow Bob,
You are the Man!
Your method of pulling the data together is so much cleaner
and simpler. Thank you. The output looks great and functions perfectly.

1. The next step I was hoping to accomplish is generate 4 pages named based on the unique folder name under "MSDS" We need to look at the 1st sub-folder name only, There are only 4 and they are always the same, just the contents change. I was thinking a case select option. The 4 options are 400 Warehouse, 500 Warehouse, Reliance Warehouse, and Shop

2. I was hoping to add in a title to the header section of each page (title)= 1stSubFolderName - was thinking first step of the case select is build the top of the HTML tags ie, <HTML><head><title>1stsubfuldername(i)</title></head><body><h1>1stsubfuldername(i)</h1>

3. Then fill each page with the <p> data you generated (quite beautifully)

4. Then after the last <p> data close the page HTML tags ie </body></HTML>

I'm puzzled how the HTML page you made didn't have opening or closing HTML tags but still displayed in my browser, magical.

mperrah
05-24-2012, 08:48 AM
Also, the output html file ends up in the my docs folder. I didnt see where you specified that. Can it generate them in the same folder the file with script is ran from? Or even the MSDS folder it is searching in (C:\Users\Mark\Documents\Right To Know_edit\msds)

Thank you so much. This thread should add to the knowledge base, how you handled the parsing is very elegant.

Bob Phillips
05-24-2012, 09:22 AM
HTML output is pretty loose, but in the next version I will add the definition markup, some browsers might be more rigorous, another version of HTMl might be also.

I am going out in a moment, but I will get to work on it when I get back.

mperrah
05-24-2012, 09:28 AM
many thanks :bow:

mperrah
05-24-2012, 10:03 PM
Nothing is conceived and perfected at the same time - so true
Wrong use does not preclude proper use - i apologies for my wrongness
and humbly welcome your correctitude...

Bob Phillips
05-25-2012, 02:32 AM
Here is an updated version.

We can get as fancy as you like with the html, add CSS, and so on.

Public Sub BuildFileHTML()
Const BASE_FOLDER As String = "C:\Test"
Dim ws As Worksheet
Dim fso As Object
Dim fldr As Object
Dim subfolder As Object
Dim mtxFiles As Variant
Dim nextrow As Long
Dim filenumber As Long

Application.ScreenUpdating = False

Set fso = CreateObject("Scripting.FilesystemObject")
Set fldr = fso.GetFolder(BASE_FOLDER)

For Each subfolder In fldr.subfolders

filenumber = FreeFile
Open ThisWorkbook.Path & Application.PathSeparator & subfolder.Name & ".html" For Output As #filenumber

ReDim mtxFiles(1 To 2, 1 To 1)

Call signatureHTML(filenumber, subfolder.Name)
Call GetFiles(mtxFiles, subfolder, nextrow)
Call bodyHTML(filenumber, mtxFiles)
Call closeHTML(filenumber)

Close #filenumber
Next subfolder

Set subfolder = Nothing
Set fldr = Nothing
Set fso = Nothing

Application.ScreenUpdating = True
End Sub

Private Function GetFiles(ByRef fileList As Variant, ByVal fldr As Object, ByRef nextrow As Long)
Dim file As Object
Dim subfolder As Object

For Each file In fldr.Files

nextrow = nextrow + 1
ReDim Preserve fileList(1 To 2, 1 To nextrow)
fileList(1, nextrow) = file.Path
fileList(2, nextrow) = file.Name
Next file

For Each subfolder In fldr.subfolders

Call GetFiles(fileList, subfolder, nextrow)
Next subfolder
End Function

Private Function signatureHTML(filenumber As Long, title As String)
Print #filenumber, "<html>"
Print #filenumber, "<body>"
Print #filenumber, "<h1>" & title & "</h1>"
End Function

Private Function bodyHTML(filenumber As Long, ByRef fileList As Variant)
Dim i As Long
For i = LBound(fileList, 2) To UBound(fileList, 2)

Print #filenumber, "<p><a href=""" & fileList(1, i) & """>" & fileList(2, i) & "</p>"
Next i
End Function

Private Function closeHTML(filenumber As Long)
Print #filenumber, "</body>"
Print #filenumber, "</html>"
End Function

SERIO72
05-25-2012, 03:07 AM
Hi all,
I've read speedily and may be that someone said the same, or the motif you want a macro to convert in html..

To have a file readable in a browser you don't need to convert XML into HTML, is more flexible if you reference it it to a template file XSL. This contains formatting rules about how the browser must visualize the XML.

Sergio

mperrah
05-25-2012, 10:13 AM
The xml was just in intermediate step. I didn't know how to pull file name and path info from a folder and subfolder to excell or html or xml. I was trying in javascript, but found vba to handle it better. I found help to make an xml output in this forum and found more help here to convert it into excel then back out to html. making a xml template probably would work to, but if I can run a single macro in excel and the end result is still the same - awesome. I'm not too picky for the path, just the destination. I have a site that gets updated very frequently 4 pages, and it just lists links to MSDS Sheets in pdf format. I wanted a script to scan for folder content changes and automatically update the page when a new pdf file gets added to the sub folder. I get notified when they get added so I can run the script and repost the html. The place where they are displayed has no internet access so I have to bring a thumb drive with the update and transfer it. Was looking for the streamline code. Looks like Bob (xld) has the solution, just making some final tweaks.

mperrah
05-25-2012, 10:28 AM
Absolutely Beautiful Bob!

I just tweaked the header to add a title for the browser :

Private Function signatureHTML(filenumber As Long, title As String)
Print #filenumber, "<html>"
Print #filenumber, "<title>" & title & "</title>" ' only tweak
Print #filenumber, "<body>"
Print #filenumber, "<h1>" & title & "</h1>"
End Function

I saved this in the MSDS folder and ran the script.
It runs fast and perfect. Thank you Fantasticaly!

I think to make a nice touch for public offering, add a message/input box for user to choose folder to start in. I don't need it for this project because my location stays the same, but this is an awesome tool you made.
Cheers :beerchug:

SERIO72
05-25-2012, 03:27 PM
The xml was just in intermediate step. I didn't know how to pull file name and path info from a folder and subfolder to excell or html or xml. I was trying in javascript, but found vba to handle it better. I found help to make an xml output in this forum and found more help here to convert it into excel then back out to html. making a xml template probably would work to, but if I can run a single macro in excel and the end result is still the same - awesome. I'm not too picky for the path, just the destination. I have a site that gets updated very frequently 4 pages, and it just lists links to MSDS Sheets in pdf format. I wanted a script to scan for folder content changes and automatically update the page when a new pdf file gets added to the sub folder. I get notified when they get added so I can run the script and repost the html. The place where they are displayed has no internet access so I have to bring a thumb drive with the update and transfer it. Was looking for the streamline code. Looks like Bob (xld) has the solution, just making some final tweaks.


Ok, I've understood.
Instead I've developed in powershell a script that scan folder and subfolders, and for each one it reads ACLs and reports it in a XML.
Each XML contains links to parent, to childrens, domain's groups and their permissions.
In XLT I've formatted these info and inserted vbs macro that extact from active directory memebrs when you click on one group.

As in your project, mine doesn't need web server and reading xml in IE browser you can navigate through ACLs.

goodnight and good continuation.. it's time I go to bed :hi:

mperrah
05-25-2012, 08:13 PM
Is there a difference how the out put page gets generated in excel 2007 as from 2010. My system at home is 2007 and the links when clicked say no application for (c) ? Is this a reference to the file structure of the link itself. It works at work and I didnt notice but at home the <a href="/c:/... The leading / I think is the problem but I can't see where that gets generated. Any ideas

mperrah
05-26-2012, 02:59 PM
I just realized. IE asks for app to open with at home (not at work)
Firefox just says none associated. So it was a browser issue/ Bob did say some are more picky, lol. I'll search setting options for browsers and make sure the tablets are set correctly. Thanks again for all the help.

Mark