have a look at

http://www.oooforum.org/forum/viewtopic.phtml?t=14348&highlight=bookmark+viewcursor <http://www.oooforum.org/forum/viewtopic.phtml?t=14348&highlight=bookmark+viewcursor>

Rui Lima wrote:
I have the following code to insert an embedded image on a WriterFile. The
code is VB.NET


Dim MyDispatcher As XDispatchHelper = MyMServiceFactory.createInstance("
com.sun.star.frame.DispatchHelper")
Dim MyProp(3) As unoidl.com.sun.star.beans.PropertyValue
MyProp(0) = MakePropertyValue("FileName", strImgFileName)
MyProp(1) = MakePropertyValue("AsLink", False)
MyProp(2) = MakePropertyValue("Style", "Image")

Dim an As unoidl.com.sun.star.frame.DispatchResultEvent = DirectCast(
MyDispatcher.executeDispatch(aDocument.getCurrentController.getFrame,
".uno:InsertGraphic", "", 0, MyProp).Value,
unoidl.com.sun.star.frame.DispatchResultEvent)

Dim MyController As XController = aDocument.getCurrentController
Dim MySelecionSupplier As XSelectionSupplier = DirectCast(MyController,
XSelectionSupplier)
Dim selection As uno.Any = MySelecionSupplier.getSelection
Dim sel As unoidl.com.sun.star.drawing.XShape = selection.Value

Dim strShapeType As String = sel.getShapeType
' Dim pos As unoidl.com.sun.star.awt.Point = sel.getPosition
sel.setSize(New unoidl.com.sun.star.awt.Size(SizeWidth, SizeHeight))


But i still have a problem with it... How can i set the position to a
BookMark position???


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to