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

SolveMacro : Add text to impress presentation slide (NewBie)

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


Joined: 04 May 2012
Posts: 14

PostPosted: Fri May 04, 2012 3:12 am    Post subject: SolveMacro : Add text to impress presentation slide (NewBie) Reply with quote

Hi,

Have been trying to write a simple slide using macro for days and got to no where Sad Just found a link that allows me to add a title to the slide. http://www.johndavidhead.com/jhead/johnhead.nsf/dx/symphony-thursday-developer-101-presentations-hello-world

However, I am unable to add text to the body of the slide. Any help or hint is appreciated to get me started is appreciated. Thank you !

Best,
Zizi


Last edited by zizi on Sun May 06, 2012 6:06 am; edited 1 time in total
Back to top
View user's profile Send private message
DVezina
OOo Advocate
OOo Advocate


Joined: 29 Sep 2006
Posts: 248
Location: Orlando

PostPosted: Fri May 04, 2012 12:41 pm    Post subject: Reply with quote

Slide.layout = 1 gives you a slide with two shapes. The first the title and the second is the body.

To enter text in the body, you need to get that shape, create a cursor and then enter your text.

Code:

Set body=Slide.getbyindex(1)'the second shape is the body
Set BodyText=body.getText()
Set Cursor=BodyText.createTextCursor()
Call BodyText.insertString(Cursor,"Outline Item 1" & Chr(10) & "Outline Item 2",False)


Hope that gets you started.
Back to top
View user's profile Send private message
zizi
General User
General User


Joined: 04 May 2012
Posts: 14

PostPosted: Fri May 04, 2012 2:08 pm    Post subject: Reply with quote

Thanks a lot for this. Is there any links that I could study ? I have tried searching the net and found none. There were a lot on writer but not really on impress .
Back to top
View user's profile Send private message
zizi
General User
General User


Joined: 04 May 2012
Posts: 14

PostPosted: Sat May 05, 2012 2:34 am    Post subject: Solved Reply with quote

Hi,

Thanks a lot for this. It has got me started.

Best,
Zizi
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