<Tr> <Td_colspan="2"> The Office (U.S. season 6) List of The Office (U.S. TV 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> <P> The episode was met with positive reviews from critics and fans . Although not all television critics reacted positively to Andy's dancing injury sub-plot, "Niagara" has nonetheless come to be considered a classic episode of the series . In a poll conducted by OfficeTally, the episode was named the second best episode of the series after the second - season finale, "Casino Night ." The episode was viewed by 9.42 million households with a 4.8 rating / 12% share in the 18--49 demographic making it the second highest viewed episode of the season after "The Delivery ." </P>

The episode where jim and pam get married
find me the text answering this question