• Embed XL worksheet into Word (XL & Word 2002)

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Embed XL worksheet into Word (XL & Word 2002)

    Author
    Topic
    #409253

    Once again, I find myself a little over my head…

    I have a worksheet that I need to embed into a word document in an automated process, creating a compound document. This document is actually a template for a report that will be customized for several customers weekly. Easy enough, except that there will be times when the embedded worksheet will be longer than the available page space. Does anyone have any code that would conditionally and flexibly split an embedded worksheet between two pages in Word?

    Viewing 1 reply thread
    Author
    Replies
    • #870817

      What do you want to do if the workbook object is too large:

      Shrink the size in word in to fit the page?

      Split the workbook object into 2 or more (as appropriate) “Areas” and embed multiple workbook objects?

      If multiple objects are to be embedded, how do you want to split them: evenly among the pages, fill up 1 sheet then put the the remaining portions onto the number of required sheets?

      Some other method?

      Not sure if this is the best way, but I could see taking the range from excel and adding it as an object in word, checking the size of the shape in word, then either adjusting to the width or ht of the activepage, or if multiple objects are desired, taking parts of the range until the correct sizes are obtained.

      I envision trial and error (by VB) to determine the sizes required (perhaps there are some techniques and objects I am unaware of for checking more systematically: I am not that familiar with words object model)

      Steve

      • #870862

        As usual, I didn’t give enough information. Whenever I do give a lot of information, I feel like I’m rambling…

        The decision I came to is that I need to split the data into multiple objects. So I’m working on that now. Thanks for the input.

      • #870863

        As usual, I didn’t give enough information. Whenever I do give a lot of information, I feel like I’m rambling…

        The decision I came to is that I need to split the data into multiple objects. So I’m working on that now. Thanks for the input.

    • #870818

      What do you want to do if the workbook object is too large:

      Shrink the size in word in to fit the page?

      Split the workbook object into 2 or more (as appropriate) “Areas” and embed multiple workbook objects?

      If multiple objects are to be embedded, how do you want to split them: evenly among the pages, fill up 1 sheet then put the the remaining portions onto the number of required sheets?

      Some other method?

      Not sure if this is the best way, but I could see taking the range from excel and adding it as an object in word, checking the size of the shape in word, then either adjusting to the width or ht of the activepage, or if multiple objects are desired, taking parts of the range until the correct sizes are obtained.

      I envision trial and error (by VB) to determine the sizes required (perhaps there are some techniques and objects I am unaware of for checking more systematically: I am not that familiar with words object model)

      Steve

    Viewing 1 reply thread
    Reply To: Embed XL worksheet into Word (XL & Word 2002)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: