Bonjour,
Dans son message, < anand > écrivait :
In this message, < anand > wrote:
|| Hello Group
|| I am converting all EMFs of a word document into GIF using Paste special
|| Selection.PasteSpecial Link:=False, DataType:=13, Placement:= _
|| wdFloatOverText, DisplayAsIcon:=False
|| The probelm is that after allignment it disturbs the aligmant of images
and
|| by default it takes left.
|| Has any one any idea how i can persist the alignment.
||
I think we need more details here...
I.ll go out on a limb here...
You mention an alignment that is disturbed in some way. Are you talking
about the new picture's alignment? If so,
Placement:= wdFloatOverText
in your code will not necessarily mean that the new picture will be wrapped
in the same way as the original one was.
You have to record the original picture parameters before cutting it.
Play around with the following code to get an idea of how it works. Just
select a picture and run the code.
'_______________________________________
Dim MyPix As Shape
Dim MyRange As Range
Dim PixWrap As Long
Dim PixWrapSide As Long
Dim PixTop As Long
Dim PixLeft As Long
With Selection.ShapeRange
With .WrapFormat
PixWrap = .Type
PixWrapSide = .Side
End With
PixTop = .Top
PixLeft = .Left
End With
Selection.Cut
Set MyRange = Selection.Range
MyRange.PasteSpecial Link:=False, DataType:=13, Placement:= _
wdFloatOverText, DisplayAsIcon:=False
Set MyPix = MyRange.ShapeRange(1)
With MyPix
With .WrapFormat
.Type = PixWrap
.Side = PixWrapSide
End With
.Left = PixLeft
.Top = PixTop
End With
MyPix.Select
Set MyPix = Nothing
Set MyRange = Nothing
'_______________________________________
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site:
http://www.word.mvps.org