关于ftp传输的问题
各位大虾请看以下代码,调用api函数:
bPath = FtpSetCurrentDirectory(hConnection, "/")
If bPath = False Then MsgBox "路径设置错误!"
bRet = FtpPutFile(hConnection, ThisDocument.FullName, "test.doc", FTP_TRANSFER_TYPE_BINARY, 0) ‘ThisDocument.FullName的值为"C:\1.doc"
If bRet Then
Msgbox "成功上传!"
Else
Msgbox "未能成功上传!"
End If
测试连接正常、路径正确、用户权限足够。
但bRet总是为False,我已经焦头烂额一天了,请各位大虾教我一个方法
把文件传到ftp服务器。我用的是word里面的vba