Private Sub force_config_to_all_layouts_then_plot()
Dim Layouts As AcadLayouts, Layout As AcadLayout
Dim oPlot As AcadPlot
Dim AddedLayouts() As String
Dim LayoutList As Variant
Dim oLayout As AcadLayout
Dim ArraySize As Integer, BatchCount As Integer
' Get layouts collection from document object
Set Layouts = ThisDrawing.Layouts
' Get the names of every layout in this drawing
For Each Layout In Layouts
Layout.ConfigName = "my_printer.pc3"
Layout.CanonicalMediaName = "A3"
Layout.PaperUnits = acMillimeters
Layout.PlotHidden = False
Layout.PlotRotation = ac0degrees
Layout.PlotType = acExtents
Layout.PlotViewportBorders = False
Layout.PlotViewportsFirst = True
Layout.PlotWithLineweights = True
Layout.PlotWithPlotStyles = False
Layout.ScaleLineweights = False
Layout.ShowPlotStyles = False
Layout.StandardScale = acScaleToFit
Layout.UseStandardScale = True
Layout.CenterPlot = True
Next
For Each oLayout In ThisDrawing.Layouts
ArraySize = ArraySize + 1
ReDim Preserve AddedLayouts(1 To ArraySize)
AddedLayouts(ArraySize) = oLayout.Name
Next
LayoutList = AddedLayouts
Set oPlot = ThisDrawing.Plot
oPlot.SetLayoutsToPlot LayoutList
oPlot.PlotToDevice
End Sub