borderAndreaVB free resources for Visual Basic developersborder

AndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincani

AndreaVB Home | News Home | Forum Home | Downloads | Register | Search | PM | Profile

Previous Topic (Calling .dll and Passing to it Arguments of Type Form, Combo box and The Like)Next Topic (Getting system MACID) New Topic Post Reply
AndreaVB OnLine : VB General : Opening a Word document from a VB form
Poster Resource
saross
Level: Guest

icon Opening a Word document from a VB form  Archived to Disk

Error reading message from disk

22-04-2002 at 01:03 PM
| Add Comment
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1617
icon Re: Opening a Word document from a VB form  Archived to Disk

Error reading message from disk

22-04-2002 at 02:57 PM
View Profile Send Email to User Show All Posts Visit Homepage | Add Comment
saross
Level: Guest

icon Re: Opening a Word document from a VB form  Archived to Disk

Error reading message from disk

22-04-2002 at 03:01 PM
| Add Comment
saross
Level: Guest

icon Re: Opening a Word document from a VB form  Archived to Disk

Error reading message from disk

25-04-2002 at 09:35 AM
| Add Comment
doppelganger
Level: Trainee

Registered: 08-07-2005
Posts: 1
icon Re: Opening a Word document from a VB form

I know this is an extremely noobish question, and well,  i am a noob ;P  How would you word the command button to open the file?
I have a textbox that has a list of documents to choose from,  and i'm wanting to have a button that opens the highlighted document in word.  I'm sure this will be a short and sweet answer  

08-07-2005 at 05:27 PM
View Profile Send Email to User Show All Posts | Add Comment
Goran
Level: Moderator


Registered: 16-05-2002
Posts: 1681
icon Re: Opening a Word document from a VB form

If the user will highlight documents name with full path to it, then it will be quite easy

OpenFile Text1.SelText, Me.hWnd


If it will hold only the name of the document, but you already know the path to folder where it resides, then this will do

OpenFile FolderPath & Text1.SelText, Me.hWnd


.... assuming that folder path finishes with backslash (\).

But I guess it would be better to have those document names placed in listbox, for example.

____________________________
If you find the answer helpful, please mark this topic as solved.

10-07-2005 at 05:00 PM
View Profile Send Email to User Show All Posts | Add Comment
AndreaVB OnLine : VB General : Opening a Word document from a VB form
Previous Topic (Calling .dll and Passing to it Arguments of Type Form, Combo box and The Like)Next Topic (Getting system MACID)New Topic Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder