[program-l] Re: Writing a program to prompt for data classification

  • From: "David Lant" <david.lant1@xxxxxxxxxxxxxx>
  • To: <program-l@xxxxxxxxxxxxx>
  • Date: Thu, 16 Dec 2010 20:44:13 -0000

Actually, there isn't a single macro deployment model for all of the Office
programs.  E.g. Excel macros have to be delivered in .XLS, .XLA or .XLT
files, Word macros are delivered in .DOC or .DOT files, and off the top of
my head I can't remember how PowerPoint macros are delivered.  Even with
macros though, you can respond to the Save event if it's exposed.  I've done
it with Word and Excel 2002 in the past.

however, for a more uniform way of doing this, it might be possible to write
an Office add-in using Visual Studio.  Depending on which version of Office
you're running, it could be done with Visual Studio 2008.  That would
definitely be able to trap the OnSave event and quite probably even
intercept the File save dialog for pre and post processing.

however, regardless of whether you do it as a macro or an add-in, you're
going to have to write some separate code for each Office product, because
they each have their own object model and you need to be able to automate
each product to do what you want.  Thus you're going to end up with three
similar versions of the same thing whichever way you go.

All the best,

David

David Lant
Applications analyst 
 
MCPD Enterprise Application Development 3.5
MCTS ASP.NET 3.5, ADO.NET 3.5, Windows Communication Foundation 3.5, Windows
Applications 3.5


-----Original Message-----
From: program-l-bounce@xxxxxxxxxxxxx [mailto:program-l-bounce@xxxxxxxxxxxxx]
On Behalf Of David Reynolds
Sent: 16 December 2010 05:24 PM
To: program-l@xxxxxxxxxxxxx
Subject: [program-l] Re: Writing a program to prompt for data classification

Good point. I was thinking that you'd have a save macro whenever anyone
wanted to save a file, but you're right, trapping save events would be
tricky.

David.

-----Original Message-----
From: program-l-bounce@xxxxxxxxxxxxx [mailto:program-l-bounce@xxxxxxxxxxxxx]
On Behalf Of Pranav Lal
Sent: 16 December 2010 16:06
To: program-l@xxxxxxxxxxxxx
Subject: [program-l] Re: Writing a program to prompt for data classification

Hi David,

How would I trap the save events of the different applications?

Pranav

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

Other related posts: