4,7-Bis(2,3-dihydrothieno[3,4-b][1,4]dioxin-5-yl)-2-phenyl-1H-benzo[d]imidazole (BImBEd) was synthesized via Stille coupling reaction of 4,7-dibromo-2-phenyl-1H-benzo[d]imidazole (BImB) with monostannylated 3,4-ethylenedioxythiophene (EDOT). In order to figure out the presence of an intramolecular hydrogen bonding between the amine bond of the imidazole ring and the oxygen of the EDOT molecule, different amounts of trifluoroacetic acid (TFA) and concentrated sodium hydroxide (NaOH) solutions were added during electrochemical polymerization. These treatments caused protonation of the imine and deprotonation of the amine bonds respectively. In order to prove the changes in the optical properties of the polymers due to different number of protonated and deprotonated imine and amine bonds, 1,4-bis(2,3-dihydrothieno[3,4-b][1,4]dioxin-5-yl)benzene (BEDOT-B) was also synthesized. Results showed that it is possible to control the main chain conformation of even an insoluble polymer via acid and base treatments during in situ polymerization. (C) 2012 Elsevier B.V. All rights reserved.