Re: Re: Code for controling FTP from Access VBA



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
.



Relevant Pages

  • Re: Open Word 2007 doc with link to Excel 2007
    ... the issue was previously raised to Microsoft based on ... They can 'extend' XML ... Using either the workaround from the above article or using the legacy ... by the file format change to XML file format. ...
    (microsoft.public.word.docmanagement)
  • Re: COMPATIBILITY
    ... .docx is the format we use. ... Microsoft about moving Word to SGML in 1989, ... XML provides a perfect circuit-breaker to the whole problem. ... XSLTs) implemented in the same standard syntax. ...
    (microsoft.public.mac.office.word)
  • Re: Download Templates
    ... large proportion of the content you read about Microsoft products is ... competing ODF (Open Document Format) seems to have rather missed the point ... of being in XML. ... which ODF is one. ...
    (microsoft.public.mac.office.word)
  • Re: optional nillable values
    ... \par Microsoft Online Support ... \par The problem when the transmitted xml is deserialized on the client the buddy field is always set to 'false' regardless ... \par Phil Lee ... \par> that Nullable object is able to be transmit through XML webservice (through ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Word 2003 XML
    ... If Microsoft really had made a life's work out of not using any standards, ... group chose the XML format that Microsoft adopted over the open format ...
    (microsoft.public.mac.office.word)