Re: Re: Code for controling FTP from Access VBA
- From: Lauren Wilson <nospam@xxxxxxxx>
- Date: Fri, 07 Oct 2005 23:53:02 -0500
On 29 Sep 2005 20:49:11 -0700, jimfortune@xxxxxxxxxxxxx wrote:
>I found:
>
>http://groups.google.com/group/comp.databases.ms-access/msg/b0c3c7de2c794782?hl=en&
The code from the above link looks good except for one thing. The
following code at the bottom of the listing is as follows:
************
* calling as
************
Dim cFTP As clsFTP
Set cFTP = New clsFTP
If Not gCancelFTP Then
With cFTP
.ServerName = DBEngine(0)(0).Properties("ServerName")
If Not .IsConnected Then
DoCmd.OpenForm "frmLogon", acNormal, , , acFormEdit,
acDialog
End If
.UserName = gUserName
.PassWord = gPassWord
.ConnectToServer
If .IsConnected Then
strFTPDirectory = DBEngine(0)(0).Properties("FamiliesFTP")
AC97Replace strFTPDirectory, "\", 1, "/"
If Left(strFTPDirectory, 1) <> "/" Then strFTPDirectory =
"/"
& strFTPDirectory Do While Right(strFTPDirectory, 1) = "/"
strFTPDirectory = Left(strFTPDirectory,
Len(strFTPDirectory) - 1) If Len(strFTPDirectory) = 0
Then
Exit Do
Loop
.DirectoryName = strFTPDirectory
If .SetCurrentDirectory Then
booCanFTP = True
Else
.ShowLastResponseInfo
End If
Else
.ShowLastResponseInfo
End If
End With
End If
If booCanFTP Then
With cFTP
FileName strHTMPath
.WriteFileName = strHTMPath
.WriteBuffer = Stream
If .OpenForWrite Then
lngBytesWritten = .WriteToFile
If lngBytesWritten <> 0 Then
lngFilesUploaded = lngFilesUploaded + 1
Else
.ShowLastResponseInfo
End If
Else
.ShowLastResponseInfo
End If
End With
End If
Set cFTP = Nothing
well ... it's a bit old ... but it seemed to work on several servers
unfortunately word wrap will be a problem here ... but since
attachments are banned ...
--
Lyle
It won't compile because it's missing the Sub header. I don't know
what to call it. Anyone have a clue?
Thanks.
>It looks interesting. Has Lyle updated it since then?
>
>James A. Fortune
>
>Microsoft has taken unprecedented steps to fully describe through a
>completely W3C-compliant XML structure the way the current editions of
>Microsoft Office docs are represented when saved as XML. The first
>time Microsoft worked with XML was in Office 2000 (development started
>in 1997), and the upcoming Office 12 file format will see the first
>time XML is used as a default file format in Office products (as
>opposed to the "binary" formats, i.e., .doc for Word, .xls for Excel,
>and .ppt for PowerPoint).
>
>http://www.mass.gov/portal/site/massgovportal/menuitem.59254d74c0e831c14db4a11030468a0c/?pageID=itdterminal&L=4&L0=Home&L1=Policies%2c+Standards+%26+Legal&L2=Open+Standards&L3=Open+Formats&sid=Aitd&b=terminalcontent&f=policies_standards_etrm_35_responses_microsoft&csid=Aitd
.
- Follow-Ups:
- Re: Code for controling FTP from Access VBA
- From: Lyle Fairfield
- Re: Code for controling FTP from Access VBA
- Prev by Date: A97 runtime error 29013?
- Next by Date: Re: Access awake after 7 years?
- Previous by thread: Re: Re: Code for controling FTP from Access VBA
- Next by thread: Re: Code for controling FTP from Access VBA
- Index(es):
Relevant Pages
|