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

Danny Brewer's DocConverter. Converting MS .doc to XHTML

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


Joined: 01 Mar 2009
Posts: 2

PostPosted: Sun Mar 01, 2009 6:12 pm    Post subject: Danny Brewer's DocConverter. Converting MS .doc to XHTML Reply with quote

Hi.

I'm using OpenOffice 3.01.

I've been using DocConverter (http://www.ooomacros.org/user.php) to try to batch convert Microsoft word 2003 docuuments (.doc) to XHTML.

The converter is a macro and seems to work fine for .doc to HTML, but not to XHTML!

The macro fails with a meaningless error on this line:

Code:
oDoc.storeToURL( cDestURL, oExportOptions )


I think the oExportOptions is what's causing the problem.

It's set further up in the code:

Code:
oExportOptions = Array( MakePropertyValue( "FilterName", cExportFilter ) )


cExportFilter is set elswhere:

Code:
cExportFilter = "XHTML File"


Can anyone shed some light on this? Or even suggest another way of batch converting multiple MS Word .doc files to XHTML?

Thanks,

Tim
Back to top
View user's profile Send private message
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Mon Mar 02, 2009 12:47 pm    Post subject: Re: Danny Brewer's DocConverter. Converting MS .doc to XHTML Reply with quote

timoffice wrote:
cExportFilter is set elswhere:

Code:
cExportFilter = "XHTML File"


Can anyone shed some light on this? Or even suggest another way of batch converting multiple MS Word .doc files to XHTML?

Where did you get that filter name from? At least in this list http://wiki.services.openoffice.org/wiki/Framework/Article/Filter/FilterList_OOo_2_1 it is called "XHTML Writer File". So give it a try.
Back to top
View user's profile Send private message
timoffice
Newbie
Newbie


Joined: 01 Mar 2009
Posts: 2

PostPosted: Mon Mar 02, 2009 1:38 pm    Post subject: You're right! Reply with quote

That's exactly what the problem was.

Well done!

So, for anyone using DocConverter to create XHTMLs, change this line of code to make it work!

Thanks,

Tim
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