Slide a ladder up under the attic access panel so you can reach it easily. Use a ladder tall enough to allow both of your hands to touch the ceiling.
Measure each edge of the opening using a tape measure. Most attic access panels are square so the sides are equal lengths. However, check the measurement to ensure the dimensions prior to cutting.
Lay a piece of molding on a table and use the tape measure to locate the area where it requires cutting to fit one side. Then mark additional pieces of molding for each of the remaining sides.
Insert the first piece of molding into a miter box and align the pencil line with the 45-degree-angle mark on the box. Insert a miter saw or hand saw into the 45-degree slot of the box and cut straight down.
Cut each end of the remaining pieces of molding in the miter box, maintaining the 45-degree angle. The result is the four pieces fit together like a picture frame.
Install the four molding pieces around the opening for the attic access panel in a square shape with each of the corners fitting flush against the adjoining piece. Hammer in 4d finishing nails spaced at 4-inch intervals to attach them to the ceiling.
Cover each nail hole with wood putty and wait until it dries. Sand the putty smooth with fine-grit sandpaper and then paint the frame with latex paint.