How can I add project Refernces with the VBIDE.dll?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In my VB solution I need to write to a MS word file the data & graphic,
therefore I need to add the VBIDE.dll in the Project Add Reference/COM.

However, when I try to search in COM list for the VBIDE ... I could not find
it, except I only find the Microsoft Word 9.0 Object Library! This alone can
not help me.

Anyone know how to add reference for VBIDE?

Thanks for any help
 
Hi Anh...

What are you talking about?

Sure thing adding the "Microsoft Word 9.0 Object Library" will help you
interact with any Word Document you want. Better yet, you don't even
need to add the reference (although it helps big time when you have
Intellisense :-)

Check he snippet below, I think it will help you.

--- BEGIN CODE ---
Dim objWord As Object
Try
Set objWord = CreateObject("Word.Application")

objWord.Documents.Add(DocumentType:=0) ' wdNewBlankDocument
objWord.Selection.InlineShapes.AddPicture("C:\IMAGE.JPG",
False, True)
objWord.Selection.TypeParagraph
objWord.Selection.TypeText("Hello World!!!")
objWord.Visible = True
Catch ex as Exception
MsgBox("Error" & vbCrLf & ex.Message)
End Try
--- END CODE ---
 
Back
Top