First of all you need to go to, File->Data File Management and Add a pst file. Select the location where file to be created, on a drive which has a reasonable amount of size.
Then you will see that PST you just created under Right hand side, in All Mail Items panel.
Now just create a copy of folders from Main
Inbox and
Send Items etc to the New PST you just created.
After all mails have been transferred you can save the PST you created in a secured location such as
External Drive.
The actual steps of this procedure depends on the
version of Office you have. But the PST which is created, you can reattach through Data File Management in any office, after formatting.
Caution: Please take care, that all the mails have been successfully transferred, and that you have backed up that PST you created properly. And then proceed with the re-installation of Windows.
You can also, create multiple PST to keep the mails of different folders. Don't create a heavy PST file, of multiple GB's. You can check what size the PST is, by right clicking the name of PST, and clicking last option, "Properties" and then clicking Folder Size.
Please don't blame me, if something goes wrong. Since transfering mails take some time, and if its interrupted, PST can become damage, and then won't be able to re-attach to Outlook later on. So pls do your homework before attempting anything.