G
gfox
Hello,
I've got a problem when copying content from a HTML page and pasting it as
HTML in my Word document.
Word simply removes the spaces between the text and images.
Steps to reproduce:
1. create a simple HTML page with the following content:
<img src="http://www.t-chest.co.uk/2005/images/whatever-happy-bunny.gif">
where is the space between the image and this text?
2. launch this page in IE, select the image and text, then paste it as HTML
in Word
You'll notice that the space between the image and the text has
disapeared... I'm using Word 2007, but I've had this issue reported under
Word 2003 and 2000 as well, so i think it affects all versions.
Do you have any idea why Word is behaving like this? Any workaround?
------------
I've been using the following workaround so far: it consists in looking for
all the graphics that have just been pasted and adding a space after them. To
do this, i've written the following macro:
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^g" ' Find graphics
.Replacement.Text = "^& " ' Replace the found graphics by itself plus an
empty space
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
But.... this workaround raises a new issue with pasted images that are
larger than the page... When this macro is executed and a space is added
after this image, the text "Error!" gets inserted right before the graphic...
I can't even delete this text, or it'll remove the graphics with it.
Any help would be welcomed
I've got a problem when copying content from a HTML page and pasting it as
HTML in my Word document.
Word simply removes the spaces between the text and images.
Steps to reproduce:
1. create a simple HTML page with the following content:
<img src="http://www.t-chest.co.uk/2005/images/whatever-happy-bunny.gif">
where is the space between the image and this text?
2. launch this page in IE, select the image and text, then paste it as HTML
in Word
You'll notice that the space between the image and the text has
disapeared... I'm using Word 2007, but I've had this issue reported under
Word 2003 and 2000 as well, so i think it affects all versions.
Do you have any idea why Word is behaving like this? Any workaround?
------------
I've been using the following workaround so far: it consists in looking for
all the graphics that have just been pasted and adding a space after them. To
do this, i've written the following macro:
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^g" ' Find graphics
.Replacement.Text = "^& " ' Replace the found graphics by itself plus an
empty space
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
But.... this workaround raises a new issue with pasted images that are
larger than the page... When this macro is executed and a space is added
after this image, the text "Error!" gets inserted right before the graphic...
I can't even delete this text, or it'll remove the graphics with it.
Any help would be welcomed