When you enter Uplay, there's an asterisk in the upper right corner – it leads to the settings.
There, you can select the option to launch Uplay in offline mode. I can't say for sure if this works for launching Heroes 7, as I haven't tested it. But Heroes 6 could be launched, albeit without the Conflux and Dynasty features. Also, Heroes 6 could be launched completely without Uplay by creating a shortcut to the game's .exe file and adding the key in the properties path /offline. Something like this: in the shortcut properties, in the "Target" field, enter "C:\Program Files (x86)\Ubisoft\Might & Magic Heroes VI\Might & Magic Heroes VI.exe" /offline.