+ Reply to Thread
Results 1 to 4 of 4

Copy and paste image to Word and rotate it

  1. #1
    Registered User
    Join Date
    02-17-2020
    Location
    Germany
    MS-Off Ver
    2019
    Posts
    28

    Copy and paste image to Word and rotate it

    Hi,

    this forum has proven as a great source of help for my project, thank you all very much! I'd like to challenge you with another problem.
    I would like to copy a table from Excel, paste it in a Word file and then rotate it 90 degrees. I tried various methods that I found online but they mostly explain how to do it after using .Add and not after pasting from Excel, and the solutions posted there have not worked yet for me.

    A minimal example of my code is:
    Please Login or Register  to view this content.
    I also tried variations of this such as wdRng.IncrementRotation -90, wd.Rng.Select Selection.IncrementRotation -90, and others - unsuccessful so far.


    I hope you can help me out once more with this one.

    PS: Happy Easter to everyone and stay healthy!
    Last edited by Menohavename; 04-14-2020 at 05:35 AM.

  2. #2
    Registered User
    Join Date
    02-17-2020
    Location
    Germany
    MS-Off Ver
    2019
    Posts
    28

    Re: Copy and paste image to Word and rotate it

    Nobody with an idea here?

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Copy and paste image to Word and rotate it

    The syntax would be

    Please Login or Register  to view this content.
    your code assumes the recently pasted item is the first item in the inlineshapes collection. If you have no others it will be but you may need to use the last shape in the collection.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    02-17-2020
    Location
    Germany
    MS-Off Ver
    2019
    Posts
    28

    Re: Copy and paste image to Word and rotate it

    Quote Originally Posted by Andy Pope View Post
    The syntax would be

    Please Login or Register  to view this content.
    Okay, now I feel stupid for asking the question. I tried various codes but this one I did not and it works perfectly, thank you!

    Quote Originally Posted by Andy Pope View Post
    your code assumes the recently pasted item is the first item in the inlineshapes collection.
    Thank you also for this hint but that's inteded, it is the only inlineshape, indeed, so it's fine.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA to copy from Excel as image and paste in Word
    By jenndan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-05-2020, 10:58 PM
  2. Rotate image of userform
    By Parth007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-26-2016, 08:11 PM
  3. Macro to Screenshot Excel and Paste Image to MS Word
    By ramlineses in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-30-2016, 05:26 PM
  4. Excel VBA to search text in word and paste an image where it finds it
    By andrealbg in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-13-2015, 11:39 AM
  5. Select Image In Excel Cell and paste to Word Doc Error 438
    By southcraven in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-15-2014, 06:48 AM
  6. Copy data range from excel to word as an image (i.e. paste special)
    By papasideris in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-21-2012, 09:54 AM
  7. Copy Paste from Excel to Word distorts image
    By Amphibia07 in forum Excel General
    Replies: 7
    Last Post: 10-29-2009, 11:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1