Passte pastes text as pic

User avatar
Peter Kinross
5StarLounger
Posts: 962
Joined: 09 Feb 2010, 00:33
Location: Patterson Lakes, Victoria, Australia

Passte pastes text as pic

Post by Peter Kinross »

Using Word 2010.
I have been using VBA to copy and paste text & pics that I use as my business signature. I have been using this for years and it has worked flawlessly. About a year or so ago I had to add a bit to the the signature. Ever since then the formatting of the paste has been so messed up, I have had to revert to pasting the whole thing as a pic. This doesn't reproduce wonderfully in emails, so I want to fix it, but can't. The only way I can get the sig to paste as text with pictures (hand written signature & logos) is to use Paste as formatted text (RTF), but the formatting is all over the place. Frustrating.
Tried: DataType:=wdPasteHTML; DataType:=wdPasteRTF & DataType:=wdPasteOLEObject
Avagr8day, regards, Peter

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Passte pastes text as pic

Post by Rudi »

It could be the formatting of the last paragraph in the Word doc that messes around with your signature?

Have you tried pasting your sig into a frame or a textbox. Here is some sample code to try test the theory...

Code: Select all

Sub InsertTextBox()
    Dim Box As Shape
    Set Box = ActiveDocument.Shapes.AddTextbox( _
        Orientation:=msoTextOrientationHorizontal, _
        Left:=50, Top:=50, Width:=100, Height:=100)
        'The solution for you:
        Box.TextFrame.TextRange.Text = "Sig here..."
End Sub
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
Peter Kinross
5StarLounger
Posts: 962
Joined: 09 Feb 2010, 00:33
Location: Patterson Lakes, Victoria, Australia

Re: Passte pastes text as pic

Post by Peter Kinross »

Thanks Rudi. That solution wouldn't work. I didn't try the code, I just tried it manually, no dice, formatting all over the place.
I have solved the problem though. I re-formatted the signature removing all text boxes, columns and section breaks. It now copies & pastes beautifully in Word.
However, I can't get it to paste into the Outlook 2010 signatures section. There, only the text is pasted. But I tried the pasting the whole thing as an image and the result is far better than pasting as an image previously, so I guess that will do.
Thanks again.
Avagr8day, regards, Peter

User avatar
Peter Kinross
5StarLounger
Posts: 962
Joined: 09 Feb 2010, 00:33
Location: Patterson Lakes, Victoria, Australia

Re: Passte pastes text as pic

Post by Peter Kinross »

I found a solution.
I had to:
  • Reduce the width of the whole part that was to be pasted.
    I did reduce the page width markers, but also inserted para markers where I wanted each line to finish.
    Combined the 3 graphics (logos) into one.
Pastes beautifully as a signature in Outlook now.
Avagr8day, regards, Peter

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Passte pastes text as pic

Post by Rudi »

TX for the update and your solution.
Have a great day!
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.