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

[Solved] Open a document in same window

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


Joined: 22 May 2012
Posts: 2

PostPosted: Tue May 22, 2012 9:46 am    Post subject: [Solved] Open a document in same window Reply with quote

Hello,
I am using vbscript for automate Openoffice 3.0 in Windows XP SP3
I want to open an document (Test2.ods) in the _same_ window of another document (Test1.ods)

Something like ...

Set oServiceManager = WScript.CreateObject("com.sun.star.ServiceManager")
Set oDesktop = oServiceManager.createInstance("com.sun.star.frame.Desktop")

fileURL = convertToURL("c:\Test1.ods")

Set oDoc = oDesktop.loadComponentFromURL(fileURL, "_blank", 0, Array())

Set ot1 = oDoc.getCurrentController
Set ot2 = ot1.getFrame
Set oWin = ot2.getContainerWindow

Is there are an method such as:

fileURL2 = convertToURL("c:\Test2.ods")
oWin.loadInThisWindow(fileURL2)

loadInThisWindow() is pure fiction..

Thanks in advance..

PD: sorry for my poor english..


Last edited by OOcorreio on Wed May 23, 2012 11:26 am; edited 1 time in total
Back to top
View user's profile Send private message
patel
Power User
Power User


Joined: 14 Apr 2012
Posts: 54
Location: Italy

PostPosted: Wed May 23, 2012 4:45 am    Post subject: Reply with quote

Are you able to open 2 documents in same window manually ?
_________________
If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button).
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Wed May 23, 2012 5:34 am    Post subject: Reply with quote

Embed multiple components into a single Window (in BASIC)
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
OOcorreio
Newbie
Newbie


Joined: 22 May 2012
Posts: 2

PostPosted: Wed May 23, 2012 11:27 am    Post subject: Reply with quote

Found it!

http://www.oooforum.org/forum/viewtopic.phtml?t=6076

Thanks everybody...
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