<P> In "Counseling", Pam feels inadequate about her poor performance in sales and tricks Gabe into promoting her to a phony new salaried position called office administrator . In "China", Pam tries to use her authority as office administrator to force building manager Dwight to stop his annoying cost - cutting measures . Pam threatens to move the office to a new building, which Dwight discovers doesn't exist . Pam saves face, however, when Dwight secretly has his assistant provide her with a book on building regulations that proves Dwight's measures were not allowed . The episode is another example of Dwight's covert protectiveness and fondness for Pam (as previously demonstrated in "The Injury", "Back from Vacation", "The Job" and "Diwali"); Mindy Kaling said during an online Q&A session that Dwight has a soft spot for her that he does not extend to anyone else at the office . She also uses her position to buy Erin Hannon an expensive desk top computer to replace the terrible one she had to use for years, as well as discreetly giving Andy a new computer, and giving Darell three sick days . At the end of the episode she proudly says that she is, "Full on corrupt ." </P> <P> In "Goodbye, Michael", Pam almost misses saying good - bye to Michael, as she spends most of the day out of the office trying to price shredders . Jim figures out Michael's plan to leave early and tells her by text . Pam reaches the airport in time and is the last person to see Michael before he leaves . </P> <P> At the beginning of Season 8, Pam is revealed to be pregnant with her and Jim's second child, Philip Halpert . The child coincided with Jenna Fischer's actual pregnancy . She begins her maternity leave after "Pam's Replacement". Pam returns in "Jury Duty", where she and Jim bring Cece and Phillip into the office . In both "Tallahassee" and "Test the Store" Pam is shown helping, and developing her friendship with Andy . </P> <P> Early in season 9, Jim is restless about his life in Scranton and helps a friend start a Sports Marketing business, Athlead, in Philadelphia but he keeps it a secret from Pam until the third episode "Andy's Ancestry". Although Pam is happy for his decision, she is concerned about the fact that he had kept it a secret from her and she is later disturbed to hear about just how much of their money he had invested . Jim begins spending part of each work week in Philadelphia, but in "Customer Loyalty", the strain of this on Pam is evident when she breaks down in tears, and is comforted by Brian, the boom mic operator of the film crew . </P>

When does pam come back to the office