Bonjour à tous et à toutes,
Je voudrai savoir comment faire pour insérer un document writer à la suite
d?un paragraphe et non sur une nouvelle page.
En utilisant le code suivant mon image est inséré sur une nouvelle page
est non à la suite du paragraphe.
Call oText.insertControlCharacter(oTextCursor ,
APPEND_PARAGRAPH , False)
oTextCursor.paraStyleName= sStyle2
Call oText.insertString( oTextCursor, « mon paragraphe » ,
False)
Call oTextCursor.gotoEnd(True)
Set oViewCursor = oDoc.currentcontroller.ViewCursor
Call oViewCursor.gotoEnd(False)
Set oTextCursor =
oText.createTextCursorByRange(oViewCursor.End)
Dim args1(1) As Variant
Set args1(0) = MakePropertyValue("Name"
,sFile )
Set args1(1) = MakePropertyValue("Filter"
,"writer8")
Call DocumentDispatch(oDoc ,
CreateUnoService("com.sun.star.frame.DispatchHelper"),".uno:InsertDoc",
args1())
Call
oText.insertControlCharacter(oTextCursor , APPEND_PARAGRAPH , False)
Call oText.insertString( oTextCursor, "",
False)
Call oTextCursor.gotoEnd(True)
oTextCursor.breakType = PAGE_AFTER
Call
oText.insertControlCharacter(oTextCursor , APPEND_PARAGRAPH , False)
Call oTextCursor.gotoEnd(True)
Merci de votre aide
Cordialement
Stéphane Turpin