I have a simple C++ wrapper class which inserts and formats text into Word.
Now I have tried to change it to set the Page Properties, margins etc.
I get the PageSetup pointer by:

PageSetupPtr pPageSetup = pDoc->GetPageSetup();

it returns an address, but when I try to use it, i.e:


It tries to branch to ffeeffee (unitialized storage).
So I guess that I must be doing something wrong, anyone any idea what?

Also, has anyone managed to get the

Find->Execute(lots of parameters...)

function to work to replace text in a document?

Any advice would be appreciated.