![]() |
|
#1
|
|||
|
|||
|
Hi,
I have to copy the active document in shared network drive I am using this macro, it is giving the error access denied. But read and write permissions are there for this folder. Please advice Appreciate your help Private Function access_Network_share() On Error GoTo ErrHandler ServerShare = "\\USER1-PC\MetaData" userName = txtUserName.Text Password = txtPassword.Text Set NetworkObject = CreateObject("WScript.Network") NetworkObject.MapNetworkDrive "", ServerShare, False, userName, Password save_As_word NetworkObject.RemoveNetworkDrive ServerShare, True, False Set NetworkObject = Nothing Exit Function ErrHandler: MsgBox "Please check your credentials" End Function Private Function save_As_word() On Error GoTo ErrHandler Kill "D:\Metadata\" & (ActiveDocument.Name) & ".DOCX" ActiveDocument.SaveAs "\\USER1-PC\MetaData\" & (ActiveDocument.Name) Exit Function ErrHandler: End Function Regards, Rose |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Live updating powerpoint playing on network drive | flossin345 | PowerPoint | 0 | 10-10-2013 09:50 AM |
Could not update file on the shared network drive with Office 2010
|
aldo4u | Word | 7 | 07-24-2013 07:56 AM |
Office Crashing when saving to Network Drive
|
robbid01 | Office | 1 | 01-05-2012 03:47 PM |
| Hyperlinking files on a mapped network drive | howler2345 | Outlook | 0 | 12-21-2011 08:54 AM |
| Mail Merge and Files on Network Drive | Joe Switch | Mail Merge | 0 | 09-15-2011 09:06 AM |