Mainly the two OS won't impact each other by a reinstall, since they are placed in seperate partitions.
But during the boot of your PC, there appears a so called Boot Manager, which lets you decide what partition you want to boot from: Ubuntu or Windows.
It should be safe to reinstall the system that provides the bootloader (at least the Ubuntu Bootloader Grub would automatically find the Win7 installation).
In your case:
If your Boot loader is provided by Ubuntu you can reinstall Win7 without any fear.
If you don't know whether you're using the Win7 or Ubuntu Bootloader think about what system you installed second - this one probably provides the bootloader (assumed you didn't configure anything manually).
Furthermore the Win7 Bootloader has a Windows-Start-Manager as a header - so you probably would notice that ;)
HI, Max, Win7 OS was installed firstly, and then I installed ubuntu by the way of wubi. I didn't configure anything manually. So if I reinstall win7, I can also enter into ubuntu without any problem? – Ying.Zhao – 2013-07-23T07:42:27.470
Then your Win7 Installation would probably overwrite Ubuntus bootloader. In the bootloader screen is the heading something with Windows-Start-Manager or GNU Grub...? Then you safely know which Bootloader you are using – Max – 2013-07-23T07:46:58.283
I don't know whether the way of installing ubuntu by wubi has a dependence on Win7 OS. So I worry about reinstalling Win7 will affect ubuntu. – Ying.Zhao – 2013-07-23T07:48:29.740
You can always repair Grub by using a live CD: https://help.ubuntu.com/community/Boot-Repair
– Max – 2013-07-23T07:50:53.157I have found some methods about repairing boot manager. My computer doesn't have a CD drive. So is there other way to repair it if I want to do this? And the bootloader screen is heading with GNU Grub, not Windows-Start-Manager. – Ying.Zhao – 2013-07-23T08:03:14.940
@Ying.Zhao You are better off asking (but start out with searching) for advice on how to reinstall GRUB on a system without a (bootable) CD drive as a separate question than in a comment. You might want to ask that over at Unix.SE, where more people who are familiar with GRUB are likely to hang out. You can also try AskUbuntu for a more Ubuntu-centric approach.
– a CVn – 2013-07-23T09:27:47.933@Ying.Zhao, That's no problem - check out how to boot a Live Image from USB. (maybe this HowTo is suitable). When you got it running you can go ahead repairing with the link mentioned above. – Max – 2013-07-23T10:18:35.750