If you have the original P12 file you just got to Preferences->Signatures->Digital IDs&Trusted Identities->More... and add you Digital ID file there.
If all you have is the P12 certificate in the Windows store, then it depends on how you installed it. If when you installed it you checked the 'Allow Export' box (I do not recall the exact wording) then you can export your certificate with the private key and then import it as mentioned in the first paragraph.
In all cases you'll need the P12certificate's password. If you forgot it, you're out of luck.