OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Auto Macro run after sheet copied to new document

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
curtdo
Newbie
Newbie


Joined: 13 Dec 2011
Posts: 1

PostPosted: Tue Dec 13, 2011 10:10 am    Post subject: Auto Macro run after sheet copied to new document Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group