PC Review


Reply
Thread Tools Rate Thread

How to create a workbook from a signed addin that is itself signed

 
 
=?Utf-8?B?d2lsbGhhbmRsZXk=?=
Guest
Posts: n/a
 
      8th Nov 2006
This has to be a common problem. We have an Excel addin that we sell to
users. This addin creates a new workbook for the user (Workbooks.add) and
copies several pages from the xla into the created workbook that themselves
contain a minimal amount of VBA code, just enough to invoke code hidden in
our addin.
We code sign the addin project using a Verisign certificate. We hoped that
users would then not be presented with the "enable macros" question (when
security is set to "medium" or above). Indeed they are not initially, when
opening Excel after installing our addin, nor when they create their own
workbook via our menu item, nor while they interact with this workbook.
However, once they save the created workbook, every time they subsequently
open it they are presented with the "enable macros" question. Or if they have
security set to "high," the macros simply don't work.
I assume this happens because of the pages containing VBA code that we
copied from the addin into the created workbook. Even though the code was
originally signed, somehow this "guarantee" does not propagate to the newly
created workbook.
Is there any solution to this, something we could do differently that would
make this work? Ideally, the solution would work in Excel 97 - current
version.
 
Reply With Quote
 
 
 
 
NickHK
Guest
Posts: n/a
 
      9th Nov 2006
I seem to remember that if a signed VBA project is altered and saved, it
cannot maintain its signature if the changes are made on a machine different
to that where the original certificate was installed.
Newer versions of Excel have more functionality in this area which may help,
but not XL2K and before

Could be wrong though...

NickHK

"willhandley" <(E-Mail Removed)> wrote in message
news:EBDC29D4-2929-4C51-B7B1-(E-Mail Removed)...
> This has to be a common problem. We have an Excel addin that we sell to
> users. This addin creates a new workbook for the user (Workbooks.add) and
> copies several pages from the xla into the created workbook that

themselves
> contain a minimal amount of VBA code, just enough to invoke code hidden in
> our addin.
> We code sign the addin project using a Verisign certificate. We hoped that
> users would then not be presented with the "enable macros" question (when
> security is set to "medium" or above). Indeed they are not initially, when
> opening Excel after installing our addin, nor when they create their own
> workbook via our menu item, nor while they interact with this workbook.
> However, once they save the created workbook, every time they subsequently
> open it they are presented with the "enable macros" question. Or if they

have
> security set to "high," the macros simply don't work.
> I assume this happens because of the pages containing VBA code that we
> copied from the addin into the created workbook. Even though the code was
> originally signed, somehow this "guarantee" does not propagate to the

newly
> created workbook.
> Is there any solution to this, something we could do differently that

would
> make this work? Ideally, the solution would work in Excel 97 - current
> version.




 
Reply With Quote
 
Peter T
Guest
Posts: n/a
 
      9th Nov 2006
Instead of creating a new book, could you distribute a signed template with
the code already in it. When you need to make a new book make a copy of the
template then add whatever data to the sheets. Would only work of course if
you don't need to change anything inside its project.

Alternatively perhaps get user to create their own self-cert and have them
add that to the new wb. Might be possible to do that semi automatically with
SendKeys with code along the lines of unprotecting a locked project. Not
sure, I've not tried. Your app would need get from user one time the name of
the self-cert and perhaps store it in the registry.

Regards,
Peter T

"willhandley" <(E-Mail Removed)> wrote in message
news:EBDC29D4-2929-4C51-B7B1-(E-Mail Removed)...
> This has to be a common problem. We have an Excel addin that we sell to
> users. This addin creates a new workbook for the user (Workbooks.add) and
> copies several pages from the xla into the created workbook that

themselves
> contain a minimal amount of VBA code, just enough to invoke code hidden in
> our addin.
> We code sign the addin project using a Verisign certificate. We hoped that
> users would then not be presented with the "enable macros" question (when
> security is set to "medium" or above). Indeed they are not initially, when
> opening Excel after installing our addin, nor when they create their own
> workbook via our menu item, nor while they interact with this workbook.
> However, once they save the created workbook, every time they subsequently
> open it they are presented with the "enable macros" question. Or if they

have
> security set to "high," the macros simply don't work.
> I assume this happens because of the pages containing VBA code that we
> copied from the addin into the created workbook. Even though the code was
> originally signed, somehow this "guarantee" does not propagate to the

newly
> created workbook.
> Is there any solution to this, something we could do differently that

would
> make this work? Ideally, the solution would work in Excel 97 - current
> version.



 
Reply With Quote
 
Peter T
Guest
Posts: n/a
 
      9th Nov 2006
PS

> > Ideally, the solution would work in Excel 97 - current version.


self-cert n/a in Office 97

Peter T


"Peter T" <peter_t@discussions> wrote in message
news:#(E-Mail Removed)...
> Instead of creating a new book, could you distribute a signed template

with
> the code already in it. When you need to make a new book make a copy of

the
> template then add whatever data to the sheets. Would only work of course

if
> you don't need to change anything inside its project.
>
> Alternatively perhaps get user to create their own self-cert and have them
> add that to the new wb. Might be possible to do that semi automatically

with
> SendKeys with code along the lines of unprotecting a locked project. Not
> sure, I've not tried. Your app would need get from user one time the name

of
> the self-cert and perhaps store it in the registry.
>
> Regards,
> Peter T
>
> "willhandley" <(E-Mail Removed)> wrote in message
> news:EBDC29D4-2929-4C51-B7B1-(E-Mail Removed)...
> > This has to be a common problem. We have an Excel addin that we sell to
> > users. This addin creates a new workbook for the user (Workbooks.add)

and
> > copies several pages from the xla into the created workbook that

> themselves
> > contain a minimal amount of VBA code, just enough to invoke code hidden

in
> > our addin.
> > We code sign the addin project using a Verisign certificate. We hoped

that
> > users would then not be presented with the "enable macros" question

(when
> > security is set to "medium" or above). Indeed they are not initially,

when
> > opening Excel after installing our addin, nor when they create their own
> > workbook via our menu item, nor while they interact with this workbook.
> > However, once they save the created workbook, every time they

subsequently
> > open it they are presented with the "enable macros" question. Or if they

> have
> > security set to "high," the macros simply don't work.
> > I assume this happens because of the pages containing VBA code that we
> > copied from the addin into the created workbook. Even though the code

was
> > originally signed, somehow this "guarantee" does not propagate to the

> newly
> > created workbook.
> > Is there any solution to this, something we could do differently that

> would
> > make this work? Ideally, the solution would work in Excel 97 - current
> > version.

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
xp digitally signed drivers show as not signed when installing jamesph Windows XP Help 2 12th May 2008 07:09 PM
Workbook Created By Signed Addin Is Itself Not Signed =?Utf-8?B?d2lsbGhhbmRsZXk=?= Microsoft Excel Misc 0 5th Nov 2006 06:53 PM
I'm signed in to windows messenger but don't show signed in =?Utf-8?B?SmFu?= Windows XP Messenger 2 15th May 2006 04:50 PM
Signed workbook depends on physical location of AddIn - Digital Signature Invalid - workaround? AndyB Microsoft Excel Programming 2 6th Jul 2004 09:16 PM
signed drivers show as not signed - Has anyone seen this problem before. it_support Windows XP Logo 1 13th Nov 2003 04:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:38 AM.