Tieing an add in to the protect document function

K

Keith Giddings

Is there any way to tie an add-ins functionality into the Protect Document
function? I'd like my add-in to run instead of the password dialog box -
does anyone know of a way to do this?

Regards
Keith.
 
W

Wei-Dong Xu [MSFT]

Hi Keith,

Thanks for posting in the community!

From my understanding, you would like to disable the password input window when one add-in accesses the word document.

When the document is protected, the password window will not be disabled. If you have any way to disable it, the password pretection for this
doc is broken. I'd suggest you can report this to me with detailed repro steps. We will research this for you.

Furthermore, for your convenience, if you dislike to see the password protected window during editting and you are using Office 2003, I'd suggest
you can choose the Information Rights Management (IRM) to restrict the user rights on one document. The Information Rights Management (IRM)
is one new feature for office 2003, with which you can create content with restricted permission so that different users will obtain the
corresponding permission on the documents to their user credentials. This way, you don't need to choose the "Protected document" for the
pretection.

These links will introduce more information for you regarding IRM:
About Information Rights Management
http://office.microsoft.com/assista...TT=1&Origin=EC790000701033&QueryID=gF05VdiBA0
&Query=information+rights+management&Scope=TC%2cHP%2cHA%2cRC%2cFX%2cES%2cEP%2cDC%2cXT

HR confidential: How can rights management help?
http://office.microsoft.com/assista...TT=1&Origin=EC790000701033&QueryID=mF05EvFY60
&Query=Information+Rights+Management&Scope=TC%2cHP%2cHA%2cRC%2cFX%2cES%2cEP%2cDC%2cXT

Controlling workbook access in Excel with Information Rights Management
http://office.microsoft.com/assista...TT=1&Origin=EC790000701033&QueryID=mF05EvFY60
&Query=Information+Rights+Management&Scope=TC%2cHP%2cHA%2cRC%2cFX%2cES%2cEP%2cDC%2cXT

Please feel free to let me know if you have any further question. It is my pleasure to be some of service.

Enjoy a nice day!

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
K

Keith Giddings

Hi Wei,
From my understanding, you would like to disable the password input
window when one add-in accesses the word document.

No, what I want to do is replace the password input window on locking a
document with a dialog box of my own (We want to be able to put a biometric
password on the document instead). As far as I can tell I will need to
completely replace the lock document mechanism as I cannot see a way to just
replace the password dialog functionality.

Incidentally is it possible for an add-in to insert an embedded object into
a document? A pointer on how to do this would be very useful (as you can
probably tell I am very new to all of this :) ).

Regards
Keith..
 
W

Wei-Dong Xu [MSFT]

Hi Keith,

Thank you for replying!

So far as I know, there is no way for us to change the password dialog window, if so, there will be some hidden security vulnerability for the
password pretected document. You can tell me more information regarding your scenario. We may find one workaround for you.

For the second question, yes, one add-in can insert one embeded object into a document in word. There is one kb article for you on the building of
one com add-in in C++.
230689 SAMPLE: Comaddin.exe Office 2000 COM Add-In Written in Visual C++
http://support.microsoft.com/?id=230689

This kb article is one for the Visual Basic.
238228 HOWTO: Build an Office 2000 COM Add-In in Visual Basic
http://support.microsoft.com/?id=238228

If you want to build one .net-based com add-in, the kb articles will help you a lot.
302896 HOW TO: Build an Office COM Add-in by Using Visual Basic .NET
http://support.microsoft.com/?id=302896

302901 HOW TO: Build an Office COM Add-in by Using Visual C# .NET
http://support.microsoft.com/?id=302901

Moreover, with the help of macro recording funtionality in word, you will be familiar with the word object very soon. The "Record New Macro"
functionality is located at "Tools->Macro->Record New Macro...". The word online document will provide more assistance for you on this issue.

In addition, every guru comes from a novice. Please feel free to let me know if you have any questions. I am standing by to be of assistance.

Best regards,

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
K

Keith Giddings

Hi Wei-Dong,
So far as I know, there is no way for us to change the password
dialog window, if so, there will be some hidden security
vulnerability for the password pretected document. You can tell me
more information regarding your scenario. We may find one workaround
for you.

OK, here is the scenario:

I don't really want to stop people from reading/changing the document, just
make it so that the document is stamped with a piece of biometric
information that is only valid until the document is changed.

User has a document that he wants to stamp. I want him to be able to click
on an add-in button or a menu option and a dialog will pop-up asking him for
a piece of biometric information (Biometrics are fingerprints, retina scans
etc). At this point I want to place something on the document that
indicates that the document is stamped with the biometric. (I'd thought
about using an OLE embedding as I can use this to put a visual
representation on the document). This visual representation would go with
the document and if the document was changed at all the visual
representation would then show that the biometric was invalid until
restamped.

Double clicking on the visual representation would then allow the authorised
user to restamp the document.
For the second question, yes, one add-in can insert one embeded
object into a document in word. There is one kb article for you on
the building of one com add-in in C++. 230689 SAMPLE: Comaddin.exe
Office 2000 COM Add-In Written in Visual C++
http://support.microsoft.com/?id=230689

That article shows me how to write an add-in (which I've now successfully
done :) ) What I want to be able to do is to use the add-in to capture
some information in a dialog and then do what the insert object dialog does.
Is this possible?

Regards
Keith.
 
W

Wei-Dong Xu [MSFT]

Hi Keith,

Thanks for more information regarding this issue!

From my understanding to this issue now, you are going to attach some biometrics information into the word document so that other user can know
this document is provided by the user who stamped his biometrics. If somebody changed this, the stamp will be invalid until someone re-stamp the
biometrics in the doc file.

If my understanding locates your requirement, I'd strongly recommend you can choose the certificate as one substitution for this biometrics. By using
certificate, there is no need for you to develop any add-in and this feature is provided with Word which has been fully tested by Microsoft. With the
certificate, the author can simply use his certificate to sign this doc. Then the doc has the author certificate information attached with him. Other
users can view this signed doc directly ( should trust this certificate first, word will pop up one alert window ). If someone changes the doc, word will
alert that the certificate will be lost, which means this document will be modified, the integrity of this doc will be broken.

The "About Digital Signature" article of word online document will introduce more information for you on this. Furthermore, one MSDN article will also
provide some information for you regarding this.
Digitally Sign a Word 2002 Document and Programmatically Retrieve Digital Signature Information
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnword2k2/html/odc_wdds.asp

Please feel free to let me know if you have any further questions.

Best regards,

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

Wei-Dong Xu [MSFT]

Hi Keith,

For your capturing question, you can feel free to develop any feature corresponding to your scenario. However, the main restriction you should note
is that the add-in runs in the word process. In most scenarios, Word runs in the security credential according to the user ( who logined into the
system ). Then the add-in security credential is limited by the user's credential. So you will need to perform full test to decide the least security
permission for your add-in.

Have a nice day!

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
K

Keith Giddings

Hi Wei-Dong,
Thanks for more information regarding this issue!

From my understanding to this issue now, you are going to attach some
biometrics information into the word document so that other user can
know
this document is provided by the user who stamped his biometrics.

It's not so the other user can know, its a requirement in this instance to
have the biometric as part of the document. If somebody changes the
document we have to indicate that the biometric is no longer valid. I
cannot use certificates because the user requirement is for a biometric :)

Anyway I now have an OLE embedded object working that can capture the
biometric and I just have to write the add-in to position and size the
embedded object in the document.

My next question is how can I determine that a document has changed? I'd
guess I need to store a checksum of some kind with the document when I store
the biometric, but is there some other method?

Regards
Keith.
 
W

Wei-Dong Xu [MSFT]

Hi Keith,

You can check the Saved property(Boolean type) of this document to see whether the document has been modified or not. Any modification to this
document will affect this property to false. So you don't need to store some value only for the modification monitoring.

Have a nice weekend!

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
K

Keith Giddings

You can check the Saved property(Boolean type) of this document to
see whether the document has been modified or not. Any modification
to this document will affect this property to false. So you don't
need to store some value only for the modification monitoring.

Thanks, that should do it.

Regards
Keith.
 

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