Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Has anyone else had problems with copytoclipboard? I have a macro to copy a chart to clipboard and paste it into Excel.
ActiveDocument.GetSheetObject("CH15").CopyBitmapToClipboard
XLWS.paste
It only seems to hang up when I schedule it to run and I'm not logged in. The code works when I run the macro myself (or simply run the scheduled task while logged in). I've tried waitforidle before and after the copytoclipboard. I've tried sleep for ten seconds before and after. I've tried both at the same time. I'm using QV 8.2 and Excel 2003.
It's been a while since I've been stumped like this with QV (20+ projects in two years). This one is escaping me.
Thanks,
David
To use that function you must have a active desktop to do the rendering. So it will not run without a logged in user. If you are trying to run from a service, you can use the psexec utility (available from MS) with the "-x" switch to "borrow" the login screen as a desktop.
-Rob
Rob,
I see. Well, I couldn't manage to get PSExec to fix this for me. Oh well, I'll print it as a pdf and move on. Thanks for the help. It's nice to know why something doesn't work instead of simply working around it.
David