Correct way to append a noun to a action


What is the correct way to append a noun to a action. For example  

> 書き **で** 頑張ります  
>  書き **を** 頑張ります

I think both the above means "I will do my best at writing". In the example
above, the stem of a verb is a noun.

Example 2:  

> 親切 **で** 有難う  
>  親切 **を** 有難う

Are both particles acceptable?




'親切 **で** 有難う' is wrong.

'親切 **を** 有難う' is acceptable, but '親切にしてくれてありがとう' is much more natural.

More politely:

  * 親切にしてくださりありがとうございます。

More formally (e.g. in a letter):

  * （貴殿の / 皆様の）ご親切に感謝申し上げます。

