Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-09-2012, 08:30 AM
tinfanide tinfanide is offline Error: Input past end of file Windows 7 64bit Error: Input past end of file Office 2010 32bit
Expert
Error: Input past end of file
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default Error: Input past end of file


Code:
Sub pdf()

Const sFile As String = "C:\test\1.pdf"
Const oFile As String = "C:\test\1.log"
Dim m, n As Integer
Dim str As String

m = FreeFile()
Open sFile For Binary As m
n = FreeFile()
Open oFile For Output As n
Do While Not EOF(m)
    Line Input #m, str
    Print #n, str
Loop

''' error
''' Input past end of file
Close m
Close n

End Sub
With the above codes, I want to write the binary data into a new log file for the purpose of counting the pages of the pdf file (m).
It runs as expected but fails before closing the n file (log file).
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: Input past end of file error: You are attempting to save a file format that is blocked by file block setting zatlas1 Office 8 04-28-2012 02:37 PM
Error: Input past end of file Error File in Word gleckie Word 2 02-02-2012 07:51 AM
Error: Input past end of file File Permission Error Pianoman 74 Word 3 01-26-2012 03:56 PM
File Conversion Error azii Word 0 01-04-2012 04:34 AM
Runtime error 5487 - Word cannot complete the save to to file permission error franferns Word 0 11-25-2009 05:35 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:43 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft