<Tr> <Td> ← Previous "The Promotion" </Td> <Td> Next → "Mafia" </Td> </Tr> <Tr> <Td_colspan="2"> List of The Office (U.S. series) episodes </Td> </Tr> <P> "Niagara" is an hour - long episode of the sixth season of the U.S. comedy series The Office . It is the 4th and 5th episodes in the season's episode count and the 104th and 105th episode of the series overall . The episode was written by executive producer Greg Daniels and Mindy Kaling, and was directed by Paul Feig . It originally aired on October 8, 2009 on NBC in the United States . </P> <P> The series--presented as if it were a real documentary--depicts the everyday lives of office employees in the Scranton, Pennsylvania, branch of the fictional Dunder Mifflin Paper Company . The episode revolves around the wedding of Jim and Pam at Niagara Falls . Not all goes smoothly when Jim accidentally reveals Pam's pregnancy to all the guests, including Pam's very old - fashioned grandmother, and Andy injures his scrotum while dancing . Meanwhile, Michael and Dwight both try to hook up with women, with mixed results . </P>

What episode in the office is jim and pam's wedding