The correct answer is A. He did not invite only his relatives.
The sentence "Not only did he invite his relatives but also all his friends and colleagues" means that he invited more than just his relatives. He also invited his friends and colleagues.
Option B is incorrect because it says that he invited not only his relatives. This is not true, because he also invited his friends and colleagues.
Option C is incorrect because it says that not only he invited his relatives. This is not true, because he also invited his friends and colleagues.
Option D is incorrect because it says that he not only invited his relatives. This is not true, because he also invited his friends and colleagues.