X-ray absorption spectra at the Al K edge have been recorded for a series of vacuum-sublimed aluminum phthalocyanine thin films: FAlPc, PcAlOAlPc, HO-AlPc (powder), ClAlPc, and ClAlPc after two kinds of structural transformations obtained by uptake of various anions into the pigment. All the recorded XANES have been correlated with three coordinations for aluminum in the phthalocyanine: an octahedral one, only found for FAlPc; a square pyramidal one found for HOAlPc, PcAlOAlPc, ClAlPc, and ClAlPc after structural transformations with some salts (KCl or KBr for instance); a square planar one found for ClAlPc after structural transformations with other salts (KI for instance). Both square planar and square pyramidal coordinations of Al are sometimes present together for some structurally modified ClAlPc films, too. When Al is in the square planar coordination, the phthalocyanine becomes a salt with an AlPc+ cation and an anion which could be Cl- but also the anion of the salt used to induce the structural modification. In order for the aluminum to remain in square planar coordination, the anion has to be at a larger distance from the aluminum than a usual bond length. The photoactivity measured for FAlPc for which Al is in octahedral coordination is about 2 orders of magnitude lower than the photoactivity measured for PcAlOAlPc or ClAlPc (structurally transformed or not). For the latter molecule, depending upon the transformation, Al is either in square planar or square pyramidal coordination. High photoactivity is recorded for either one or the other coordinations of Al in the modified ClAlPc films. The low photoactivity of FAlPc is not an exception. There are examples in the literature indicating that other "polymeric" phthalocyanines displaying an octahedral symmetry around the metal are also characterized by a low photoactivity.