>>I have a web site that I set up to download MS Project files. The problem we are having is that the people who fund the project have MS Project 98 and some of the remote engineers who need to download files have MS Project 2000. The people with the money have mandated that all MS Project files be saved as MS Project 98 format. Well some engineers forget or don't know the rules. So is there a way in VFP that I can determine the MS Project version that the file was saved in. That way I can send the user to an error page informing them of this before the record is downloaded from the web and a database record added.
>>
>>TIA
>
>
>Bret,
>The brute force approach could be to open the MPP file using the LLFF and read the first 5000 bytes of the file. The string "Microsoft Project 9.0" will be there for Project 2000. "Microsoft Project 8.0" will be there for Project 98.
>
>HTH.
This code seemed to work OK:
lcheck = FILETOSTR('C:\Temp\Project2.mpp')
llcontinue = .F.
FOR i = 1 TO 6000
IF UPPER(SUBSTR(lcheck,i,17)) = 'MICROSOFT PROJECT'
lcFound = SUBSTR(lcheck,i,21)
EXIT
ENDIF
ENDFOR
IF NOT EMPTY(lcFound)
RETURN(lcFound)
ELSE
RETURN('Unknown')
ENDIF
Now I just need to get this into a FoxWeb call and test it against my Cold Fusion web site. Thanks again.
Bret Hobbs
"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope