macros

MS Word: How do I create a shortcut or toolbar button for the "Paste Special..Unformatted Text" option?

I have been playing with this for a while, but the closest I have gotten is a button that opens the "Paste Special" dialog box and requires another couple of mouse clicks to paste the contents of the clipboard as unformatted text. So often I am doing a copy-paste from a web site into a document where I don't want the additional baggage...

Excel Macro Help

I'm looking for assistance in creating an excel macro with the following two functions: Increment or decrement a value based on an action of another field. For example. cell b2 starts out with "0", it will either increment or decrement by "1" if another cell is clicked. Another way is say I have in cell D2, a two way arrow and one end ...

Excel - Macro to conditionally copy rows to another worksheet

Does anyone have a macro or could point me to a way that I could conditionally copy rows from one worksheet to another in Excel 2003. I'm pulling a list of data from Sharepoint via web query into a blank worksheet in Excel, and then I want to copy the rows for a particular month to a particular worksheet (e.g., all July data from Share...

Tool to reformat xml-comments (Visual Studio 2008)

Hi there, does anyone know of a macro or add-on for VS 2008 which reformats xml-comments? There has been this really smart CommentReflower for the older version of VS, but I couldn't find a release supporting VS 2008. Any ideas? Thanks in advance! Matthias ...

Win32 ShellExecute and a UNC Path

I'm writing a little macro which will fire up a flash presentation. I'm using VBA to do this inside Powerpoint 2007. I am calling the Win32 ShellExecute() routine. Everything works GREAT but when I run this from a location whose path is a UNC path (\myserver\myfolder\sample.ppt) it does not work. The ShellExecute routine expects 6 argum...

Excel Macro Language

I have an old Excel 4 Macro that I use to run monthly invoices. It is about 3000 lines and has many Excel 5 Dialog Box sheets (for dialog boxes). I would like to know what the easiest way would be to change it into Visual Basic and if it is worth it. I would also like to know how, if once I have converted it to VBA, how to create a st...

When are C++ macros beneficial?

The C preprocessor is justifiably feared and shunned by the C++ community. In-lined functions, consts and templates are usually a safer and superior alternative to a #define. The following macro: #define SUCCEEDED(hr) ((HRESULT)(hr) >= 0) is in no way superior to the type safe: inline bool succeeded(int hr) { return hr >= 0; } Bu...

Can I create a Visual Studio macro to launch a specific project in the debugger?

Hi. My project has both client and server components in the same solution file. I usually have the debugger set to start them together when debugging, but it's often the case where I start the server up outside of the debugger so I can start and stop the client as needed when working on client-side only stuff. (this is much faster). I...

Best AutoHotKey macros?

Hi, I use AutoHotKey for Windows macros. Most commonly I use it to define hotkeys that start/focus particular apps, and one to send an instant email message into my ToDo list. I also have an emergency one that kills all of my big memory-hogging apps (Outlook, Firefox, etc). So, does anyone have any good AHK macros to share? ...

Is there a Macro Recorder for Eclipse?

Anybody know of a good eclipse plugin for recording and playing back macros? I've tried this one, but it didn't do me any good- seemed like it wasn't ready for primetime. I know about editor templates, but I'm looking for something that I can use to record my keystrokes and then apply multiple times against a wad of text. This seems li...

Is there a good general method for debugging C++ macros?

In general, I occasionally have a chain of nested macros with a few preprocessor conditional elements in their definitions. These can be painful to debug since it's hard to directly see the actual code being executed. A while ago I vaguely remember finding a compiler (gcc) flag to expand them, but I had trouble getting this to work in ...

likely/unlikely macros in the Linux kernel

I've been digging through some parts of the Linux kernel, and found calls like this: if (unlikely(fd < 0)) { /* Do something */ } or if (likely(!err)) { /* Do something */ } I've found the definition of them: #define likely(x) __builtin_expect((x),1) #define unlikely(x) __builtin_expect((x),0) I know that they ...

Finding Cell Range With Excel Macros

I have an many embedded objects (shapes) in a worksheet and the icons is displayed inside a cell. How do I know the Cell range in which the shape object is displayed. for eg : When I select a Cell B2 and then select the object(shape) in the cell B17, and I query on the Cell.Address it shows B2. How will I get the cell address as B17. ...

Remove Right Click Print Context Menu from Outlook

Is there any way that I can remove the Print item from the context menu when you right-click on an email with a Macro? I am forever right-clicking to reply to an email, only to accidentally click Print and have Outlook send it directly to the printer quicker than I can stop it. NB: I am using Outlook 2007. ...

VBA in PowerPoint

Could anyone recommend me a good online guide to PowerPoint VBA? Else, does anyone has advice on how to record a macro in PowerPoint? Thanks! ...

Sources for learning about Scheme Macros: define-syntax and syntax-rules

I've read JRM's Syntax-rules Primer for the Merely Eccentric and it has helped me understand syntax-rules and how it's different from common-lisp's define-macro. syntax-rules is only one way of implementing a syntax transformer within define-syntax. I'm looking for two things, the first is more examples and explanations of syntax-rules...

Is it worth investing time in learning Visual Studio Macro System(usage-creation)?

I have used visual studio for a long time, but one feature I have never used is the Macro system. I saw a post where someone mentioned he used macros (no elaboration) so I was wondering is it really worth the time investing in learning how to create macros? If so what kind of stuff do you make? There was similar post(s), but i am try...

Can a macro be used for read-only access to a variable?

Can you define a macro that accesses a normal variable, but in a read-only fashion (other than defining it as a call to a function)? For example, can the VALUE macro in the following code be defined in such a way that the dostuff() function causes a compile error? struct myobj { int value; } /* This macro does not satisfy the read-on...

Can the C preprocessor be used to tell if a file exists?

I have a very large codebase (read: thousands of modules) that has code shared across numerous projects that all run on different operating systems with different c++ compilers. Needless to say, maintaining the build process can be quite a chore. There are several places in the codebase where it would clean up the code substantially if...

How do I prevent Excel from rendering the spreadsheet as my macro calculates it?

My macro updates a large spreadsheet with numbers, but it runs very slowly as excel is rendering the result as it computes it. How do I stop excel from rendering the output until the macro is complete? ...