+ Reply to Thread
Results 1 to 2 of 2

Pasting multiple ranges as Bitmaps into Word + Editing them

  1. #1
    Registered User
    Join Date
    07-23-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    2

    Pasting multiple ranges as Bitmaps into Word + Editing them

    Hi excel masters,

    I'm very new to VBA (this is my first post) and I'm trying to write a complicated code that will select a varying number of 32 row x 8 column boxes and paste them into a new word document as bitmap images, one on each page. I'm also trying to format each bitmap picture with a plain black border of 1.5 pt weight.

    The code I have now can open up a new Word document and paste the first 26 ranges, but then it gives me an error and won't paste any more ranges. Also, none of the coding that I have tried today has succeeded in formatting an outline on the pictures.

    Is anyone able to help me fix either of these issues? I'm at a loss for how to proceed. Here is the code I have been using:

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    07-23-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Pasting multiple ranges as Bitmaps into Word + Editing them

    Solved it! Sort of. I've explained how for future users with the same problem.

    Office simply won't let me paste a 27th bitmap in one macro. Even if I run my macro for 26 ranges and then manually copy and paste, it doesn't work. At first I made two macros: one for the first 26 ranges and one for the next 26, however this was pretty clunky. I figure that the office clipboard was full, but I don't know a way around this.

    I ended up pasting everything as enhanced metafiles, which actually works better than bitmaps. Not only do they seem to be better quality, but now I can use the selectall feature (I couldn't with Bitmap). This appears to get rid of the 26 range issue, although I've only tried it with 32 ranges so far. As for the outline issue, I simply created a border around each range and selected an extra row and column on every side of the range, which works for me. It might be that using enhanced metafiles would solve that issue, too, but I don't know. Here's the relevant piece of coding:

    Please Login or Register  to view this content.
    Last edited by jmfenn; 07-24-2012 at 04:52 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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