Get to other Network Computer

D

dsc

I would appreciate any help with a problem.



I have VBA macros that let me save files to or open files from directories
and other computers on my network. For instance:



Sub OpenThumbDrive()

ChangeFileOpenDirectory ("G:\")

With Dialogs(wdDialogFileOpen)

..Name = "*.*"

..Show

End With

End Sub



....and:



Sub SaveEnglish()

Dim strPath As String

strPath = "\\English\duty (c)\"

With Dialogs(wdDialogFileSaveAs)

.Name = strPath

.Name = strPath & ActiveDocument.Name

.Show 'displays the dialog but doesn't actually

'do the Save

End With

End Sub



However, I have a new notebook with Vista, and it requires a user name and
password before it will allow me to access it from another computer, so this
macro doesn't work:



Sub OpenNotebook()

ChangeFileOpenDirectory ("\\Notebook\C\Documents\Advantage Links\")

With Dialogs(wdDialogFileOpen)

..Name = "*.*"

..Show

End With

End Sub



Is there any way to pass the user name and password with this macro?



Any assistance appreciated.
 
K

Kevin Dufendach

I'm not sure about either of these suggestions as I don't have Vista
myself, but perhaps you could open the directory "\\Notebook\C
\Documents\Advantage Links\" using File Explorer or with a shortcut
from your desktop (obviously giving the username and password at that
time) and then try running the macro. Another option would be to map
the network folder as a drive letter and then run your macro
referencing your mapped drive.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top