views:

48

answers:

3

Can anyone provide the resource to learn making connection between computers over the LAN and retrieve files?

EDIT: And can I browse the folders like its done in the local machine?

+2  A: 

Just use the UNC path. The other computer should have a folder shared.

\\OtherComputerName\SharedFolderName\FileYouWantName.txt

Use that path in vb to open/read the file just as you would a local path.

Neil N
+1  A: 
Dim f As FileStream = File.Open("\\server\folder\subfolder\file.txt",FileMode.Open)
Jim
+1  A: 

If the document is on a share on the other computer, you can use the other answers (the UNC path: \server\share\file.doc). WPF does focus support on XPS files, but if you want to open a Word file in your application, maybe check out this post.

If you just want to launch Word and open the file, you'll have to check out the Office Interop assemblies. Something like this should work (I haven't tested this myself though):

Dim wordApplication As New Word.Application
Dim document As New Word.Document

document = wordApplication .Documents.Open("\\server\share\file.doc")
Peter