S
stuart
hi,
i have an issue with pasteing an image out of a text box back onto a
word document and repositioning it on the document so i can select the
picture as a shape for copying into powerpoint.
every time i paste the copied image it overwrites the whole document.
any help would be appreciated.
For iCount = 1 To oDoc.Shapes.Count
If oDoc.Shapes(iCount).Type = msoTextBox Then
If
oDoc.Shapes(iCount).TextFrame.ContainingRange.InlineShapes.Count <> 0
Then
Clipboard.Clear
oDoc.Shapes(iCount).TextFrame.ContainingRange.InlineShapes(1).Select
m_objWord.Selection.Copy
iImgLeft = oDoc.Shapes(iCount).Left
iImgTop = oDoc.Shapes(iCount).Top
oDoc.Shapes(iCount).Delete
m_objWord.Selection.Collapse wdCollapseStart
oDoc.Content.PasteSpecial
placement:=wdFloatOverText
'odoc.Range.
m_objWord.Selection.InlineShapes(1).ConvertToShape
m_objWord.Selection.ShapeRange(1).Left = iImgLeft
m_objWord.Selection.ShapeRange(1).Top = iImgTop
End If
End If
Next
cheers, Stu
i have an issue with pasteing an image out of a text box back onto a
word document and repositioning it on the document so i can select the
picture as a shape for copying into powerpoint.
every time i paste the copied image it overwrites the whole document.
any help would be appreciated.
For iCount = 1 To oDoc.Shapes.Count
If oDoc.Shapes(iCount).Type = msoTextBox Then
If
oDoc.Shapes(iCount).TextFrame.ContainingRange.InlineShapes.Count <> 0
Then
Clipboard.Clear
oDoc.Shapes(iCount).TextFrame.ContainingRange.InlineShapes(1).Select
m_objWord.Selection.Copy
iImgLeft = oDoc.Shapes(iCount).Left
iImgTop = oDoc.Shapes(iCount).Top
oDoc.Shapes(iCount).Delete
m_objWord.Selection.Collapse wdCollapseStart
oDoc.Content.PasteSpecial
placement:=wdFloatOverText
'odoc.Range.
m_objWord.Selection.InlineShapes(1).ConvertToShape
m_objWord.Selection.ShapeRange(1).Left = iImgLeft
m_objWord.Selection.ShapeRange(1).Top = iImgTop
End If
End If
Next
cheers, Stu