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

Assigning a new Macro to one document.

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


Joined: 04 Nov 2010
Posts: 2

PostPosted: Thu Nov 04, 2010 5:33 pm    Post subject: Assigning a new Macro to one document. Reply with quote

I created a macro for a document that I want to run when the document is opened.

The macro is created and saved and works as desired.

However, I can't figure out how to assign that macro to the Document Open event.

I open the macro editor, select the macro I want to assign and then select the Assign button, but when the Assign dialog is open, it doesn't contain macro located in the document.

This is a document specific macro that I do not want accessable in other documents.

How do I assign this macro when the Assign Event doesn't show it?

Thanks,

Richard..
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 9183
Location: Lexinton, Kentucky, USA

PostPosted: Fri Nov 05, 2010 6:42 am    Post subject: Reply with quote

From the document (not the macro) do Tools > Customize > Events tab where you will find your macro.

Your problem is a bug.
Back to top
View user's profile Send private message
rcbill
Newbie
Newbie


Joined: 04 Nov 2010
Posts: 2

PostPosted: Fri Nov 05, 2010 8:36 am    Post subject: Reply with quote

Okay, I found that, but when I assigned the macro to the "Open Document" event, closed the document and then opened it, all the macro gave me were numbers.

Should be:
Friday, November 5, 2010 at 8:51 AM

Macro returns:
40487.48 at 40487.48

The macro worked correctly until I attached it to the Open Document event, then it started returning only numbers. Now that is all it returns, even after I removed it from the event, closed and reopend the document, it is still giving just numbers.

What is going on here?

Thanks,[/list]
Back to top
View user's profile Send private message
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 9183
Location: Lexinton, Kentucky, USA

PostPosted: Fri Nov 05, 2010 1:58 pm    Post subject: Reply with quote

Put the date, etc., in the document using fields then select it and make it an AutoText entry (Ctrl+F3). That use to also return numbers but works correctly now.
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