Problem with a Shimmed excel add-in - Help help help

G

Guilherme - Brazil

Dear friends,

I’m trying to generate an excel add-in with shim for 2 weeks. It seems to be
easy, but it doesn´t work.

My continuous routine:

1. Install Windows XP Professional SP2
2. Install.NET Framework 2.0
3. Install Visual Studio 2005
4. Install vs2005-kb908002-enu-x86.exe - MICROSOFT OTK LOADER UPDATE TO
MICROSOFT VISUAL STUDIO 2005
5. Install Microsoft Office 2003
6. Install Microsoft Office 2003 SP1
7. Install COMShimWizardSetup.msi – COM Shim Wizards x2.0.0.0
8. Install Office XP or 2003 Primary Interop Assemblies Readme File. It
doesn´t change anything when I´m runnig the sample project.
9. I open the Addin sample solution generated by the COM Shim Wizards
installation. SCREEN CAPTURE( http://www.cin.ufpe.br/~gbs2/shim/2projects.JPG
)
10. I click on the SetupProject propriety, prerequisite and check the
“Shared Add-in Support Update for Microsoft .NET Framework 2.0†SCREEN
CAPTURE ( http://www.cin.ufpe.br/~gbs2/shim/prerequisites.JPG )
11. I tried to generate a strong dll (In the project propriety). Generating
or not generating the addin will fail later.
12. I rebuild the TestAddinSetup and I install it.
13. I run excel.exe and the addin is working
14. I exit from the excel
15. I click on “add a new project†on the solution panel. Select the
COMShims and finally the “Addin Shim Projectâ€
16. Now the WizardSetup is running. I select the generated dll from the
TestAddinSetup. I let the “Use the GUI/ProgID†selected, I select the
“Microsoft Excelâ€, the “Load addin when the office starts†and the “Addin
available to usersâ€. SCREEN CAPTURE(
http://www.cin.ufpe.br/~gbs2/shim/wizard.JPG ) . The summary is showed SCREEN
CAPTURE(http://www.cin.ufpe.br/~gbs2/shim/wizard2.JPG) .I click the finish
button.
17. I build the ShimProject. SCREEN CAPTURE (
http://www.cin.ufpe.br/~gbs2/shim/3projects.JPG )
18. When I start the excel.
19. There’s a security warning. I click on Enable. (When the checkbox “Trust
all addins†is checked, there isn’t any security warning screen) (The
security was changed to Medium or Low)
20. The excel starts and the addin doesn’t work.
21. Now the excel is broken, if I uninstall the addin and install it again,
the addin doesn’t work. So I need to clear the partition and start this
routine again with few changes.

Anybody could help me??? What I’m doing that this addin doesn’t work??? Is
there any missing step??? Anybody have a step-by-step tutorial??? Or an
example with shim that works?? I read some documentation in MSDN but there´s
no more details from the shim process.

Best regards,

From Brazil,

Guilherme
 
M

Michael

is this just on a non developer machine? or the on the pc that have
visual studio installed?

greets from swizerland
Mitch
 
G

Guilherme - Brazil

Hi Michael,

This occurs on all scenarios that I tested:
*on the developer machine(with VS2005 installed) - scenario 1
*in another partition without VS2005 installed - scenario 2
*in another personal computer - scenario 3

Thanks,

Guilherme
 
M

Michael

Hi Guilherme,

does the Add-In exist in the "COM Add-Ins" window in Excel? and is it
checked?

if not, setup is missing some registry entrys..

something like:
Dim sRegKey As String
Dim newKey As RegistryKey
sRegKey = "Software\Microsoft\Office\Word\Addins\MyAddIN"
newKey = Registry.CurrentUser.CreateSubKey(sRegKey)
newKey.SetValue("Description", "let me be a working addin",
RegistryValueKind.String)
newKey.SetValue("FriendlyName", "MyAddIN", RegistryValueKind.String)
newKey.SetValue("LoadBehavior", 3, RegistryValueKind.DWord)
newKey.Close()



greets
mitch
 
G

Guilherme - Brazil

Hi Michael,

There are these references in the setup project without the shim.
http://www.cin.ufpe.br/~gbs2/shim/registrySetupProject.JPG

Should I create another setup project with the generated shim DLL(after the
build on the shim project) and these references in the registry?

Do you have any working shim example ou screen capture of a shim Setup
project??

Thanks again for the help

Guilherme
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top