You can create a self-signed certificate with OpenSSL using the following command:
openssl req -x509 -newkey rsa:2048 -days 365 -keyout private-key.pem -out certificate.pem
This will create a new 2048-bit RSA key and a new self-signed certificate based on that key, which will be valid for one year. To use the certificate with Microsoft Outlook, you may need a PKCS#12 file, which can be created by running the following once the above has been successful:
openssl pkcs12 -export -inkey private-key.pem -in certificate.pem -out my-digital-id.p12
In the above commands,
private-key.pem is the private key file (which my system insisted be encrypted, and which you need to keep secret to the user),
certificate.pem is the freely-distributable certificate that all recipients will need to trust, and
my-digital-id.p12 is a PKCS#12 file containing both the key and certificate. PKCS#12 files are commonly used on Microsoft platforms for importing and exporting certificates and keys.
If you want to change the way the certificate is generated, what extensions are included, etc., then I suggest taking a look at the req, x509, and x509v3_config pages in the OpenSSL manual.