Results 1 to 2 of 2

Thread: Insert Graphics into Word from VB

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2004
    Posts
    5

    Insert Graphics into Word from VB

    Is it possible to insert a graphic into word through vb code? I've looked at the selection.insertfile("c:\........) routine but it's not working. If anyone has any ideas, I'd greatly appreciate them. Thanks!

  2. #2
    Lively Member
    Join Date
    Jul 2002
    Posts
    78
    Try this instead:

    VB Code:
    1. .Selection.InlineShapes.AddPicture FileName:="yourpath.yourgraphicfilename.ext", _
    2. LinkToFile:=False, SaveWithDocument:=True

    Insert file is for just that, files... graphics are treated a bit differently.

    Don't forget if there is ever anything you need to do in Word through VB, simply record a basic macro and "doctor it up" as necessary in VB!!

    Good luck,
    Mary

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