Documentation says:
Syntax
AssemblyDocument.SaveAs( FileName As String, SaveCopyAs As Boolean )
you need to reference the document you are trying to save ie: oDoc.SaveAs( FileName, True)
Also, there is another forum here called "Inventor Customization" for programming questions where you will probably get quicker and better answers. Good Luck.
Besides referencing to document to call the method as @imajar mentioned, there is some common syntax tricks in VBA that it supports calling a method in either of the ways, take Document.SaveAs as example:
1.With parenthesis: Call Document.SaveAs(Param1, Param2)
2. With paraenthesis: Document.SaveAs Param1, Param2
Code example:
Dim oDoc As AssemblyDocument
Set oDoc = ThisApplication.ActiveDocument
oDoc.SaveAs "c:\temp\aa.iam", False

Given the fact I see various 'End With' statements and a '.Close' statement, leads me to believe the 'SaveAs' command in the red line of code should also precede with a '.'
Noticing the fact there's a '.SaveAs' statement commented out above the red line of code and assuming that is done because it didn't work, lends me to believe something's wrong with your 'With' statements.