Results 1 to 3 of 3

Thread: Loading a Image in word through Vb

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Location
    India
    Posts
    11

    Loading a Image in word through Vb

    Hai everybody,
    I am trying to load an image in word through vb. The following is the code sample


    Private wd As Word.Application
    Set wd = New Word.Application
    wd.Visible = True
    wd.documents.open "c:\filename.bmp"

    It opens the word but the bmp is in boxes ans different characters. Let me know how can i load the exact bmp in the word
    application
    Reply me as quick as possible.

    yours ,
    Gopal

  2. #2
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    Word.Application.Documents(1).InlineShapes.AddPicture FileName:= _
    "C:\Path\File.bmp", LinkToFile:=False, SaveWithDocument:=True

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Location
    India
    Posts
    11

    Thanks to alexRead

    Thanks to alex_Read and all others.
    The code provideb by alex_Read works fine.

    yours,
    Gopal

Posting Permissions

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



Click Here to Expand Forum to Full Width