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

OO Writer an VBA

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


Joined: 31 Oct 2010
Posts: 1

PostPosted: Sun Oct 31, 2010 3:35 am    Post subject: OO Writer an VBA Reply with quote

Hallo,

Im new in Openoffice and i have a question.

I want open a . doc file with VBA and search for text in the document and replace it. My Code:

datname = "file:///" & NeueVorlage


Set ooApp = CreateObject("com.sun.star.ServiceManager")
Set ooDesk = ooApp.createInstance("com.sun.star.frame.Desktop")

Set ooDoc = ooDesk.loadComponentFromURL(datname, "_blank", 0, args)


With ooDoc
.store
.Open
End With

With this Code can I open the Document with OO Writer, but how can I search for a text and replace it?

Sorry for my bad english Smile
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Mon Nov 01, 2010 7:21 am    Post subject: Reply with quote

http://www.kalitech.fr/clients/doc/VB_APIOOo_en.html
describes precisely how to get a Writer document from VB or VBA.
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
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