Lenses have a minimum focus distance: that is, a limit where the lens is physically incapable of focusing on any subject closer than that distance.
The specs for the Ixus 165 state that the lens it has a focal length range of 5-40mm. The specs also state that you can shoot from 1cm away, but qualify that spec for being in Macro mode, with the lens set to (W) or the wide end of the zoom range: 5mm--the exact opposite end from zooming in 8x (using 40mm). I assume the 5cm focus distance in "normal" mode is also for the wide end of the zoom range.
The wider the lens, the closer you can get to things. Being in macro mode doesn't actually make your lens capable of focusing closer, it simply changes the distances through which the AF system searches for focus. Macro mode simply tells the camera to search through the full focus range, but because this substantially slows down AF speed it's a special mode; out of Macro mode, the super-close distances are skipped to speed up AF.
The longer the focal length of the lens, however, the bigger the minimum focus distance becomes. 12 inches may still be too close if the lens is zoomed all the way out to the telephoto (T) end of the range: 40mm. When I shoot with a 400mm lens on my dSLR, anything closer than 10 feet cannot be focused on. And with my 40mm f/2.8, the minimum focus distance is 11.8". I think if you'd simply moved back an inch or so, then your camera's lens would have been able to achieve focus.
Another issue that may cause an issue with achieving AF lock would include shooting in low light (not enough contrast for the AF system to detect an in-focus situation), but that doesn't look to be the case here, since text with a white background should give you plenty of contrast.