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

Changing the HTML view style to Print Layout

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


Joined: 07 Jun 2005
Posts: 2

PostPosted: Tue Jun 07, 2005 7:19 am    Post subject: Changing the HTML view style to Print Layout Reply with quote

Hi all,

I'm using VBS to load an HTML file, and want to also get it to set the View style to Print Layout and can't find how to do it anywhere!

Any help gratefully received, total newbie going nuts here!

Thanks!
Back to top
View user's profile Send private message
ms777
Super User
Super User


Joined: 07 Feb 2004
Posts: 1355

PostPosted: Tue Jun 07, 2005 1:35 pm    Post subject: Reply with quote

Thats how it goes in BASIC ...
Code:
Sub Main
sUrl = ConvertToUrl("C:\Windows\Desktop\test.htm")
oDoc = StarDesktop.LoadComponentFromUrl(sUrl,"_default",0,Array())

oContr = oDoc.CurrentController
oContr.ViewSettings.setPropertyValue("ShowOnlineLayout", false)

End Sub


For testing / learning the OO API I recommend the following:
- Always start with BASIC (because there you have XRay to examine the OO objects)
- install XRay
- install the SDK doc (XRay needs it to show info about the objects)

Links are given here http://www.oooforum.org/forum/viewtopic.phtml?p=80453#80453

Good luck ms777
Back to top
View user's profile Send private message
viaduct
Newbie
Newbie


Joined: 07 Jun 2005
Posts: 2

PostPosted: Tue Jun 07, 2005 11:50 pm    Post subject: Reply with quote

Genius, spot on. Cool

I find it hard to accept that something that was going to take pages and pages of C++ can be done in 4 lines of BASIC! Shocked

Thanks ms777!
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