curtdo Newbie

Joined: 13 Dec 2011 Posts: 1
|
Posted: Tue Dec 13, 2011 10:10 am Post subject: Auto Macro run after sheet copied to new document |
|
|
I am copying a calc sheet to a new document via a recorded macro.
| Code: | args6(0).Name = "DocName"
..........
args6(0).Value = ""
args6(1).Name = "Index"
args6(1).Value = 32767
args6(2).Name = "Copy"
args6(2).Value = true
dispatcher.executeDispatch(document, ".uno:Move", "", 0, args6())
end sub
|
Once the new document is created (Untitled 1) I need to run a macro to save this as an html doc. This new macro runs fine manually.
Can someone please tell me how to automatically run the new macro against the newly created page. When I try, the macro runs agains the source page and not the new document that was created.
I have tried running a macro on the new document using customization- Document Created and almost all the others, in source doc and in OfficeOrg
I know I am missing something about how to set the new page focus. I tried some code from another post using setFocus() and/or toFront() after adding the Tools lib, and after running enumeration loop over the open docs, but it does not switch the focus to the new doc.
Thanks for any help |
|