fileSize Property

Microsoft FrontPage Visual Basic

fileSize Property

Returns a String that represents the file size in bytes.

expression.fileSize

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

The following example inserts a new paragraph in the the active document and then inserts the dates for when the active document was created and last modified and the size of the file.

    Sub AddDates()
    Dim objPara As FPHTMLParaElement
    
    With ActiveDocument
        .body.insertAdjacentHTML where:="beforeend", _
            HTML:="<p id=""newpara2""></p>"
    
        Set objPara = .body.all.tags("p").Item("newpara2")
        
        objPara.innerHTML = "Created: " & .fileCreatedDate & _
            "<BR>Changed: " & .fileModifiedDate & _
            "<BR>File Size: " & .fileSize & " bytes"
    End With
End Sub