Welcome to NeoOffice Forums
Loading

Trinity
· Home
· News
· Private Messages
· Stories Archive
· Your Account


RSS Feeds
· Headlines
· Forum Posts
· NeoOffice Releases
· Early Access Releases
· NeoOffice Mobile


Twitter Feeds
· @NeoOffice


Download NeoOffice
· Get NeoOffice
· Get the Latest Patch
· Language Packs
· User Guide
· User Guide Volume 2


Other Websites
· NeoOffice.org
· NeoWiki
· Neo BugZilla
· OpenOffice.org


Who's Online
There are currently, 123 guest(s) and 7 member(s) that are online.

You are Anonymous user. You can register for free by clicking here


Languages
Select Interface Language:



  
trinity.neooffice.org :: View topic - Certain Macros don't work in NeoOffice 3.0.2
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Private MessagesPrivate Messages   Log inLog in 

Certain Macros don't work in NeoOffice 3.0.2
Donors who have donated US$100.00 within the last year can post

 
Post new topic   Reply to topic    trinity.neooffice.org Forum Index -> NeoOffice Support
View previous topic :: View next topic  
Author Message
Lorinda
Link


Joined: Jun 20, 2006
Posts: 1919
Location: Midwest, USA

PostPosted: Wed Feb 03, 2010 10:15 am    Post subject: Certain Macros don't work in NeoOffice 3.0.2 Reply with quote

Over the last couple of days, I have discovered that two macros I created some time back and use almost every week are no longer working in NeoOffice 3.0.2.

Both are macros that I recorded, and both make use of the Find/Replace function and regular expressions. I'm almost positive they worked with NeoOffice 3.0.2EA, as today was the first time one of them didn't work, and that one I do indeed use every week.

I don't get any error messages, they just don't do what they are supposed to do.

Normally I run them from custom buttons on the toolbar, but I tried going to Tools>Macros>Run and accessing them that way with no difficulty.

I re-recorded one of the macros today, making a few alterations to perfect the formatting it does for me, and it runs fine.

I'll work on creating a set of files needed to reproduce this. Can I attach a zip file, or do I need to attach them separately?

Lorinda

NeoOffice 3.0.2 patch 0, Mac OSX 10.4.11
Back to top
View user's profile Send private message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 9310
Location: California, USA

PostPosted: Wed Feb 03, 2010 10:20 am    Post subject: Reply with quote

You can attach a zip file but please include steps to install them and what is supposed to happen when you run the macro.

There have been absolutely zero changes to the OpenOffice.org Basic code in NeoOffice 3.0.2. The only change that I think might affect macros would be the disabling of Excel A1 and R1C1 cell formats in formulas but that should only potentially affect Calc macros written in Excel VBA.

Patrick
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 9310
Location: California, USA

PostPosted: Wed Feb 03, 2010 10:29 am    Post subject: Reply with quote

I have one more request: please tell me which lines in your macros are failing. Generally, debugging other peoples macros is not something that I can do. But what I can do is debug the operation specific macro commands and see if any of NeoOffice's underlying OpenOffice.org code that is executed by a command is failing.

Patrick
Back to top
View user's profile Send private message Visit poster's website
Lorinda
Link


Joined: Jun 20, 2006
Posts: 1919
Location: Midwest, USA

PostPosted: Wed Feb 03, 2010 11:00 am    Post subject: Reply with quote

Embarassed Embarassed Never mind Embarassed Embarassed

Now they are both working fine again. No doubt it was user error, not a Neo error. Sorry to bother you.

Lorinda
Back to top
View user's profile Send private message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 9310
Location: California, USA

PostPosted: Wed Feb 03, 2010 11:16 am    Post subject: Reply with quote

Lorinda wrote:
Now they are both working fine again. No doubt it was user error, not a Neo error. Sorry to bother you.


No problem. Most likely I would guess that your problem was due to one of the following two causes:

1. Bad data - If your macro is written to expect data in a certain format and you input bad data (like inputting text in a cell that the macro expects to contain a number), your macro will fail without error.

2. Bug in your macro - Macros are custom code and one of most common problems in any custom code is that the code was not written to handle every possible case that it may encounter.

In either case, the best way to find the cause of the problem is to debug your macro by selecting the Tools :: Macros :: Organize Macros :: NeoOffice Basic menu and in the dialog that appears, select your macro and press the Edit button.

The NeoOffice Basic window will appear. Don't press the Run button. Instead, press the Step Over button to execute one line at a time. This allows you to follow the logic that your macro is executing so that you can find the line that is doing something different than you expect. If you find such a line, you can edit your macro to fix the specific bug in your macro, save your macro, and rerun to test your fix.

Hope that helps,

Patrick
Back to top
View user's profile Send private message Visit poster's website
Lorinda
Link


Joined: Jun 20, 2006
Posts: 1919
Location: Midwest, USA

PostPosted: Wed Feb 03, 2010 12:15 pm    Post subject: Reply with quote

Thanks, Patrick.

Both macros were fairly simple text manipulation macros, created by recording a series of Find & Replace commands. I'm guessing that the problem with one of them may have been that the cursor was in the wrong place when I invoked the macro. (Which in effect would be an example of bad data).

The other possibility is the macro isn't clearing previous settings from the Find & Replace dialog before starting. When I went to make the formatting changes by manually calling up Find and Replace, my first attempt didn't work, and I discovered it was because the "format" of the Find box was set for a relatively obscure font (from a "manual" find and replace I executed the other day). If Neo was using that setting when running either of my macros, they wouldn't have worked, because none of the text I was trying to format was in that font.

I'll keep the Step Over command in mind another time. My challenge is that I know next to nothing about NeoOffice Basic and macro programing. I can record and save a macro, or copy code from elsewhere and paste it in the right spot, but that's about it.

Lorinda
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    trinity.neooffice.org Forum Index -> NeoOffice Support All times are GMT - 7 Hours
Page 1 of 1

 
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
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group


All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2003->today by Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.08 Seconds