macros

How far can LISP macros go?

I have read a lot that LISP can redefine syntax on the fly, presumably with macros. I am curious how far does this actually go? Can you redefine the language structure so much that it borderline becomes a compiler for another language? For example, could you change the functional nature of LISP into a more object oriented syntax and s...

Visual Studio 2005 Macros stop working when Visual Studio 2008 is installed

I have a number of macros written for Visual Studio 2005, but they have since stopped working once I installed Visual Studio 2008 on my computer. No error is returned by the macro when I try and run it, and the environment merely shows the hourglass for a second and then returns to the normal cursor. Currently uninstalling one or the oth...

[ADO.NET] What's the deal with |Pipe-delimited| variables in connection strings?

I know that |DataDirectory| will resolve to App_Data in an ASP.NET application but is that hard-coded or is there a generalized mechanism at work along the lines of %environment variables%? ...

Do you have any recommended macros for Microsoft Visual Studio?

What are some macros that you have found useful in Visual Studio for code manipulation and automation? ...

How do you create a debug only function that takes a variable argument list? Like printf()

I'd like to make a debug logging function with the same parameters as printf. But one that can be removed by the pre-processor during optimized builds. For example: Debug_Print("Warning: value %d > 3!\n", value); I've looked at variadic macros but those aren't available on all platforms. gcc supports them msvc does not. ...

How to enable the TRACE macro in Release mode?

The TRACE macro can be used to output diagnostic messages to the debugger when the code is compiled in Debug mode. I need the same messages while in Release mode. Is there a way to achieve this? (Please do not waste your time discussing why I should not be using TRACE in Release mode :-) ...

Helpful snippits?

I'm a relatively new coder, and I'm looking to increase my snippits library. What are some of your most used snippits? I'm mainly looking for ones that I might not have thought about until I've had more experience, but will make me more productive. Have a snippit that is particularly clever? Post it! ...

VS2008/TFS: Get Latest of solution from command line or macro

How do I get the latest version of my solution recursively like its done in the solution explorer context menu of Visual Studio? Need to do this from the command line or via a macro. /* 'tf get' only gets contents of a folder recursively (not solution). It does not look at project dependencies and so on. That won't work. */ I'm trying ...

good directory picker for visual basic macros in MS Outlook (2007)

I wrote a visual basic macro for archiving attachments for Outlook 2007, but did not find a totally satisfactory way for showing a directory picker from the outlook macro. Now, I don't know much about either Windows APIs or VB(A) programming, but the "standard" windows file dialog I see most often in Microsoft applications would seem lik...

What are the best keyboard macros for programming in windows?

I like putting shortcuts of the form "g - google.lnk" in my start menu so google is two keystrokes away. Win, g. My eight or so most frequent applications go there. I also make links to my solution files I am always opening "x - Popular Project.lnk" Are there any better ways to automate opening frequently used applications? ...

How to disable Visual Studio macro "tip" balloon?

Whenever I use a macro in Visual Studio I get an annoying tip balloon in the system tray and an accompanying "pop" sound. It says: Visual Studio .NET macros To stop the macro from running, double-click the spinning cassette. Click here to not show this balloon again. I have trouble clicking the balloon because my macro runs ...

Modifying a spreadsheet using a VB macro

I have two spreadsheets... when one gets modified in a certain way I want to have a macro run that modifies the second in an appropriate manner. I've already isolated the event I need to act on (the modification of any cell in a particular column), I just can't seem to find any concrete information on accessing and modifying another spr...

How do I assign a keyboard shortcut to a VBA macro in Outlook 2007?

How can I assign a keyboard shortcut to a VBA macro in Outlook 2007? I know how to create a tool for the macro and put it in a menu with an underscore shortcut. This solution requires me to use a shortcut of ALT-{menu key}-{tool key}. What if I want to assign it to ALT-F12 or something like that? The Visual Basic Editor is assigned to ...

How do I keep RecipientTime when executing MailItem.Move in an Outlook macro?

In an Outlook 2003 macro; Is there a way to move a message between folders without changing the ReceivedTime-header? I currently use the method MailItem.Move. But that automatically sets the ReceivedTime property to the current time, which isn't really what I want. ...

How do I save each sheet in an Excel workbook to separate CSV files with a macro?

Title says it all. I have an excel with multiple sheets. And I was looking for a macro that will save each sheet to a separate CSV (comma separated file). Excel will not allow you to save all sheets to different CSV files. ...

My first Lisp macro; is it leaky?

I've been working through Practical Common Lisp and as an exercise decided to write a macro to determine if a number is a multiple of another number: (defmacro multp (value factor) `(= (rem ,value ,factor) 0)) so that : (multp 40 10) evaluates to true whilst (multp 40 13) does not The question is does this macro leak in some way?...

is there a way to write macros with a variable argument list in visual C++?

As far as I know, in gcc you can write something like: #define DBGPRINT(fmt...) printf(fmt); Is there a way to do that in VC++? ...

Writing a ++ macro in Common Lisp

I've been attempting to write a Lisp macro that would perfom the equivalent of ++ in other programming languages for semantic reasons. I've attempted to do this in several different ways, but none of them seem to work, and all are accepted by the interpreter, so I don't know if I have the correct syntax or not. My idea of how this woul...

How can I refresh all the pivot tables in my excel workbook with a macro?

I have a workbook with 20 different pivot tables. Is there any easy way to find all the pivot tables and refresh them in VB? ...

How can I find last row that contains data in the excel sheet with a macro?

How can I find the last row that contains data in a specific column and on a specific sheet? ...