Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Selfcert to disable the 'enable macros' prompt in outlook

Status
Not open for further replies.

sugarflux

Technical User
Aug 14, 2003
111
GB
Hi

Can anyone help me please?
I have designed a simple macro that changes the reply address in Outlook 2000 to a generic email address for the company. (On_Send)

I want to disable the 'Enable / Disable Macros' prompt on all users PCs. I have read in other threads that this can be achieved by assigning a Digital Certificate with Selfcert.exe.

However, our users are running on Citrix and when trying to assign the self certificate, i get an error:
'An error ocurred while trying to sign the project. The unsigned project has been saved'

Can anyone help me combat this or have another workaround?
Please help!

sugarflux
 
Thanks for getting back to me, M
I've had a look at the link and tried the suggestions but don't seem to be getting very far...

Is there any chance you can walk me through it?
Sorry - i think i need more of an idiots guide! If not, maybe you could point me in the right direction?

Thanks in advance

sugarflux
 
From what I remember and my notes basically 3 steps.

(fill in with your own info and file names - run from command line)

1. makecert -r -n "CN=Your Name" -b 01/01/2000 -e 01/01/2099 -eku 1.3.6.1.5.5.7.3.3 -sv selfcert.pvk selfcert.cer

2. cert2spc selfcert.cer selfcert.spc

3. pvkimprt -pfx selfcert.spc selfcert.pvk

You will need to find makecert.exe, cert2spc.exe, pvkimprt.exe on the net.

You can get options from for each from help.

M

 
PS once you get a .PFX file then you can just double click on it to except it. Then in VBA interface go TOOLS>DIGITAL SIGNATURE select the certificate and save the file.

Close the file and reopen it. When prompted check "Always turst macros from this source then click Enable Macros.

Distribute the .pfx file as well as your Outlook code. They will have except the certificate in the same way..

M
 
I followed all the steps above. Thanks again for all your help.

Unfortunately, when trying to assign the cert in Outlook VBA i get the error:
An error occurred while trying to sign the project. The unsigned project has been saved

I also tried importing the Certificate to the PC with both MMC and through the Internet Explorer>Tools>Internet Options>Content>Certificates to which i get the error:
An Internal Error Occurred. The private key that you are importing might require a cryptographic service provider that is not installed on your system

I think this sounds 'Citrix-y' but can't pinpoint exactly what is going wrong or find a way round?

Any ideas?

Thanks again in advance for your help....
sugarflux
 
I assume you double-clicked on the .pfx file and installed it. From there open Outlook then Alt-F11 to open the VBA interface. Go to TOOLS>DIGITAL SIGNATURE select the certificate from the browse button and OK it and close the VBA interface.

Close Outlook and reopen it. It may prompt you to check "Always turst macros from this source then click Enable Macros.

Distribute the .pfx file as well as your Outlook code. They may have to except the certificate in the same way..

M
 
The very first step is when i get the message.

I double click the .pfx, click next at the welcome screen,
Click next to the file path screen
Type in the password (have tried with all combos of tick boxes)
Clicked next
Have tried auto assigning the store and selecting each of the stores, clicked next
Clicked finish
and the error:
An Internal Error Occurred. The private key that you are importing might require a cryptographic service provider that is not installed on your system

appears
 
Not sure about the problem.

I just recreated it with:

makecert -r -n "CN=test 2004" -b 01/01/2000 -e 01/01/2099 -eku 1.3.6.1.5.5.7.3.3 -sv test.pvk test.cer

cert2spc test.cer test.spc

pvkimprt -pfx test.spc test.pvk

I left the password blank and took the defaults for all the rest except I did choose "yes export the private key" in the 3rd step.

M

Hope that helps.

M

 
Thanks for all your help, anyway!

If anyone else has any suggestions please feel free to advise...!

sugarflux
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top