Home All Groups Group Topic Archive Search About

VB writing image to MS Word doc

Author
11 Jun 2009 5:42 PM
graham_s
I am trying to convert the following VB5/6 printing code for use to 'print'
to an MS Word doc.

' plot graphs etc
    x1 = 6000
    y1 = 3500
    w1 = picLoadHistory.width
    h1 = picLoadHistory.Height
    picLoadHistory.Picture = picLoadHistory.Image
    Printer.PaintPicture picLoadHistory.Picture, x1, y1, w1, h1  ', x2, y2,
width2, height2, opcode


Can anyone help with the equivalent VB(A) code to drop the image onto a
particular spot on a Word page??

Thanks

Author
16 Jun 2009 11:59 AM
Jan Hyde
graham_s <grah***@discussions.microsoft.com>'s wild thoughts
were released on Thu, 11 Jun 2009 10:42:02 -0700 bearing the
following fruit:

Show quoteHide quote
>I am trying to convert the following VB5/6 printing code for use to 'print'
>to an MS Word doc.
>
>' plot graphs etc
>    x1 = 6000
>    y1 = 3500
>    w1 = picLoadHistory.width
>    h1 = picLoadHistory.Height
>    picLoadHistory.Picture = picLoadHistory.Image
>    Printer.PaintPicture picLoadHistory.Picture, x1, y1, w1, h1  ', x2, y2,
>width2, height2, opcode
>   
>
>Can anyone help with the equivalent VB(A) code to drop the image onto a
>particular spot on a Word page??
>
>Thanks

open word, start the macro recorder, do what it is you want
to do then stop the recorder. That should give you any code
you need.


--
Jan Hyde