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

Add image into swriter, wrap to background and move location

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


Joined: 14 May 2009
Posts: 2

PostPosted: Thu May 14, 2009 12:51 am    Post subject: Add image into swriter, wrap to background and move location Reply with quote

This is what I have, I able to add the image into the Swriter, but unable to wrap it to background and move to a certain location, can anyone help plz ? oh forgot to mention its in vb.net.

Code:

    Function fct_AddImageToSWriter(ByVal objWriter As Object, ByVal strImageFile As String, ByVal pLocation As Point, ByVal pSize As Size)
        Dim oG As Object
        oG = objWriter.createInstance("com.sun.star.text.GraphicObject")
        oG.GraphicURL = convertToURL(strImageFile)
        oG.Width = pSize.Width
        oG.Height = pSize.Height

        Dim oText = objWriter.getText()
        Dim oViewCursor = objWriter.getCurrentController().getViewCursor()
        Dim oCursor = oText.createTextCursor()

        objWriter.getText.insertTextContent(oCursor, oG, False)
        Return True
    End Function
Back to top
View user's profile Send private message
narf03
Newbie
Newbie


Joined: 14 May 2009
Posts: 2

PostPosted: Fri May 15, 2009 5:38 am    Post subject: solved Reply with quote

nvm, used other method and solved, thanks for reading.
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