Awesome Visual Studio Macros
For a small community discussion, what are some essential Visual Studio macros you guys use? I just started learning about them, and want to hear what some of you guys can't live without. ...
For a small community discussion, what are some essential Visual Studio macros you guys use? I just started learning about them, and want to hear what some of you guys can't live without. ...
Hallo I am writing down the requirements of what I want to do using a macro in excel: I have a workbook with 4 worksheets: The SourceSheet where I save my database, the TargetSheet where I want to send some products of the database, in order to do some calculations,the resultsSheet and the InfoSheet. If the user double clicks in a ce...
In my code I have several macros. Macro A is the main macro. Macro A then calls macro B which in turn calls macro C. In SAS, do I have to define them in backwards order? In other words, do I have to define macro C first, then macro B, then macro A last? Or does it matter since SAS reads all the code in before it actually hits the ...
#define SAFE_DELETE(a) if( (a) != NULL ) delete (a); (a) = NULL; OR template<typename T> void safe_delete(T*& a) { delete a; a = NULL; } or any other better way ...
I have a macro taking several parameters. Some of these are optional and if a parameter is left empty it will replaced with default. Now the question is how to make this as easy as possible for ordinary web designer. Is there any other possibity apart from my examples to handle this case? Example 1: The obvious problem here is the op...
Hi Guys and Girls, apologies if this isn't considered right for SO but we have a strange problem with processing Excel Macros on our servers. We have over 100 excel spreadsheets which are created overnight on our server by WebFOCUS which are all formatted by macros. The spreadsheet is created using a template, the macro runs and then ...
I use Netbeans (nightly build) for Ruby on Rails development and I'm looking to beef up my macros. I've created a few myself: copy identifier: select-identifier copy-to-clipboard paste clipboard over identifier: select-identifier paste-from-clipboard double quote element select-element-next "\"" single quote element: select...
I have recently noticed how interesting Visual Studio's macros are. I did not use VB for ages so it took me a while until i finally managed to write a little macro that performs some stuff on the currently open document. Enthusiastically, I next wanted to use this macro on every source code file (.cs) in the solution without having to m...
I keep typing "t eh" instead of " the" which is, of course, annoying in the amount of time it takes me to correct myself. The obvious answer is "Learn to type, noob!" or at least to type more slowly and/or more correctly. This error is frighteningly consistent so it appears I've trained my muscle memory for that pattern already. But I...
I have an HTML page with links that when clicked open to a specific bookmark in a word document. I am working with an existing word 2003 document with no preexisting bookmarks. I want to add bookmarks to all section number header locations using a macro or a VBA script . Example 3.1.4.2 HERE STUFF 3.1.4.2.1 Here again ...
I have a button which launches a macro in OpenOffice. Within the macro, I want to change the name of the button. The original code for Excel is ActiveSheet.Shapes("PunchButton").select Selection.Characters.Text = "Punch In" but the first line does nothing. I've checked the sheet in OpenOffice and the button has the right nam...
Hello, In a macro, I'm applying the same treatment in each Worksheets of the file. I want to determine wich column contains a specfic text (might be different in each WS). For Each Cell_version In Ws.Range("1:1") If Ws.Range(convertir(Cell_version.Column) & "1") = "ICI" Then Column_version = convertir(Cell_version.Column) ...
I realize that I may be being a bit lazy, but does anyone know of a Visual Studio macro, where I can select some text inside of the Visual Studio IDE, click a button, and have it wrap the selected text with tags? It would generate something like: <strong>My Selected Text</strong> I would even be up for creating a macro, just not sur...
I'm writing firmware in C for an embedded processor. I want to have all the configuration information in one header file called config.h. This is causing problems with the ADC initialization, where simple #defines won't do the trick. Right now the code is like so: config.h #define NUMBER_OF_POTS 1 #define POT_1_CHANNEL 27 adc.c #d...
How can I make a LaTex macro which replaces each \and by the word "and" \or by the word "or" so that the nouns are not in italics? ...
I would like to launch a URL when an email arrives in Outlook. I setup a rule and have it trigger a script function. It looks like I want to call ShellExecute to launch the URL in a browser, but when I hit this line: ShellExecute(0&, "open", URL, vbNullString, vbNullString, _ vbNormalFocus) The method is not defined. Any ideas?...
Is it possible to create macros to replace all forms of operator new with overloads that include additional args...say __FILE__ and __LINE__? The trouble appears to be that operator new can either be coded with or without parentheses, therefore: object-like macros: #define new new(__FILE__, __LINE__) will replace declarations like:...
Let us say that we have two columns in a spreadsheet. Is it possible to perform set operations on the two columns and save the result in a third column? For eg. Col1 Col2 Col3 --------------------- A B A C D F F C D Here Col3 = Col1 - Col2 where "-" is a set operation. Is there a way to do this in Openoffice Ca...
I am looking for a way to fill in the blanks when naming test functions. I have seen this demo'd at a few Test Driven Presentations. Can some point me to an addin or let me know how i can create such macro in Visual Studio 2008 [TestMethod] void test login page with failed user(){...} to [TestMethod] void test_login_page_with_failed_...
Hey! I am following the code from microsoft from this page: http://support.microsoft.com/kb/306108 This is what I have: Public Sub GetMails(Item As Outlook.MailItem) MsgBox "Mail message arrived: " & Item.SenderEmailAddress MsgBox "Mail message arrived: " & Item.Subject MsgBox "Mail message arrived: " & Item.Body End Sub ...