I am using PowerShell to create open a .xlsx, then save it as a macro enabled workbook (.xlsm) and it adds a vb script to vba projects > modules with
$AutofitModule = $workbook.VBProject.VBComponents.Add(1)
$Autofit = @"
Instead of saving this to vba projects > modules as the first image shows, I would like to save it to vbaprojects > Microsoft Excel Opbjects > Thisworkbook as the 2nd image shows.
Any help is greatly appreciated