Bullock’s attorney obtained the protective order on her behalf against Thomas James Weldon, who has been the subject of previous court orders to stay away from the 45-year-old actress.

A hearing for a three-year order against Weldon was scheduled for Aug. 6.

Bullock first obtained a restraining order in California against Weldon in 2003, but that order expired in 2009. He voluntarily entered a mental institution in Tennessee, and the actress sued the state in 2006 to require them to notify her of his release.

According to the court filing, Weldon turned up in a Wyoming emergency room last month complaining of anxiety and sleeplessness. He later told hospital staff that he had driven from Tennessee in an attempt to meet Bullock at her home in Jackson Hole, Wyo.

Declarations from a doctor who interviewed Weldon in Wyoming said that Weldon believes he has communicated with Bullock telepathically. He told doctors that he has not been taking his medications.

“His preoccupation with Ms. Bullock is obvious,” Dr. Jiri Danczik, a psychiatrist, wrote in a sworn declaration.

It is unclear when Weldon was released from the mental institution in Tennessee.

Bullock’s attorney, Ed McPherson, filed a declaration stating that Weldon has sent the actress numerous e-mails and faxes in recent years.

The actress’ previous court filings have accused Weldon of repeatedly trying to contact Bullock and traveling around the country in an attempt to meet her. Bullock has never met Weldon, the court filing said.

The restraining order seeks to block Weldon from trying to contact Bullock at any of her homes and any of her movie sets. It also seeks to protect her 7-month-old Louis Bardo Bullock, whom the actress is in the process of adopting.