[CS6]Get the app version in which the document was first created

Hi All,
Is there a way to get the application version in which the document was first created?
Eg: I have a CS6 plugin in which I want to know wether the current document was originally created in CS3 or CS5 or so on.
Any help will be highly appreciated.

I hope that's what you're looking for
        const char* szFileName = "path_to_indd_file";
        FILE* pFile = fopen(szFileName, "rb");
        fseek(pFile, 0x1D, SEEK_CUR);
        int32 ver_maj, ver_min;
        fread(&ver_maj, sizeof(int32), 1, pFile);
        fread(&ver_min, sizeof(int32), 1, pFile);
        switch (ver_maj)
            case 5:
                CAlert::InformationAlert("CS3");
                break;
            case 6:
                CAlert::InformationAlert("CS4");
            case 7:
                ver_min == 5? CAlert::InformationAlert("CS5.5"): CAlert::InformationAlert("CS5") ;
                break;
            case 8:
                CAlert::InformationAlert("CS6");
                break;
            case 9:
                CAlert::InformationAlert("CC");
                break;
            default:
                CAlert::InformationAlert("Unknown version");
                break;
        fclose(pFile);
Regards
Bartek

Similar Messages

Maybe you are looking for