Paste unformatted text in Word 2003

Annoyed that Word keeps trying to paste your copied text in the original format? Record a new macro to fix it!

Tools -> Macro -> Record New macro
Give it a name – I called mine “PasteUnformatted”. The name can’t have spaces.
Click keyboard shortcut and give it a shortcut, I used Ctrl+v (this means the default paste behaviour on ctrl+v is ignored, but I never want the default behaviour)
Click Ok. The macro starts recording.
Click Edit -> Paste Special -> Select ‘Unformatted text’, then stop recording the macro with the macro toolbar.
This doesn’t quite work, as it forgets the unformatted bit (don’t ask me why, this is Microsoft), so open tools->Macro->Macros.
Select your macro and pick edit. Change the line to this:

Selection.PasteAndFormat (wdFormatPlainText)

Save and exit the macro editer.

now when you press ctrl+v you should get unformatted text (so it should match your document’s current formatting)

There are better ways to do this in Word 2007.

‘Windows 8’

So, someone leaked windows 8 discussion documents and uploaded them, and you can take a look at some of them over at Microsoft Kitchen

I just found it amusing that in this slide: amusing slide about windows 8

They are clearly considering their target audience as ‘everyone’ and have a slightly humorous (I think) section

“Why humans matter”
-Substantial in size

Other than that the idea of logging in by face recognition sounds abysmal. But the increased speed and ubiquitous settings through a cloud is more interesting.

Passing variables in C++

Just a bit of condensed info that people will hopefully find helpful…

Variables that go ‘in’ but not ‘out’:
==================================

void foo(int x)
{
x=6;
}

-x will not be modified outside the scope of foo
-x is copied (consider overhead for big things)

==================================

void foo(int const &x)
{
x=6; //will no compile
}

-x cannot be modified inside foo
-x is not copied, preventing some overhead

==================================

Variables that go in and out
==================================

void foo(int &x)
{
x=6;
}

-x will be modified within foo and outside of foo
-x is not copied, preventing overhead, but modification of x outside of foo may be undesirable. see the use of const above.
-simpler than using pointer technique and avoids having to change calling code to pass a pointer

==================================

void foo(int *x)
{
*x = 6;
}

-the value at *x will be modified inside and outside foo
-x is not copied
-involves more effort to program

==================================