Can I have a macro run whenever I save a file in Visual Studio 2005?

Posted by Mark on Stack Overflow See other posts from Stack Overflow or by Mark
Published on 2010-04-02T13:01:29Z Indexed on 2010/04/02 13:53 UTC
Read the original article Hit count: 399

When I save a file in Visual Studio 2005, I'd like to have a macro also run that updates a copyright (through a regular expression search and replace).

I'm not new to regular expressions, but I am new to VB/VBA and Visual Studio macros, so what I need help with specifically is:

  1. getting a macro to run upon save, preferably after I press CTRL-S but before it actually writes the file so that the results of the search and replace are actually saved without having to save twice

  2. calling search and replace for a regular expression from inside the VB/VBA macro

Thanks, Mark

© Stack Overflow or respective owner

Related posts about visual-studio-2005

Related posts about visual-studio