Access Application list forms

I have an existing Access application that I would like to use a PowerShell script to list all of the forms with their associated fields in that application. Is there anyone here that could help me do this?

I believe to get to the forms, you will need to use com objects. If you were just getting data from tables, you could use ADO or OLEDB to connect. You might want to start by looking at the documentation:

https://docs.microsoft.com/en-us/office/vba/api/access.application

Unfortunately all the examples are VBA but once you instantiate the objects in PowerShell, the properties and methods are all the same.

Here’s docs on using com objects in PowerShell.

https://docs.microsoft.com/en-us/powershell/scripting/samples/creating-.net-and-com-objects--new-object-?view=powershell-5.1

Thank you. I don’t need to use the COM objects (which I assume Forms are). I just need to list them. I see there is a Instantiating an object like

$ApplicationPath = "Foo.accdb" $Acc = new-object -com access.application $Acc.OpenCurrentDatabase($<wbr />ApplicationPath)
With the CurrentProject.AllForms I can list each form. I am afraid the full answer to this question might require a little knowledge of Access as the $_.Properties property on each form doesn't seem to list all the properties. Any hints on how to list the properties?