When do you use するには as opposed to するため（には） to mean "in order to"?


I keep having `するため（には）` corrected to `するには` when writing sentences, but how
interchangeable are they and when should each be used?

Taking some Japanese sentences from [Space
ALC](http://eow.alc.co.jp/in+order+to/UTF-8/) with my own English
translations, is there some reason why one or the other is more
natural/correct than the other in these examples for instance?

>   * 仕事で成功 **するには** 、家で、喜んで私を助けてくれる夫が必要なのです。  
>  In order to succeed at my job, at home, it's essential for there to be a
> husband who happily helps me out.
>
>   * 花粉症を予防 **するために** 、眼鏡やマスクをして花粉から目や鼻を守ることが重要です。  
>  In order to prevent hay fever, it's essential to wear glasses and a mask,
> and protect one's eyes and nose from pollen.
>
>

**EDIT:** Here's one example:

>   * 日本語の言葉の背景色を灰色にするために、二つのグレイヴ・アクセント（``）を使う:
>

Which was corrected to:

>   * 日本語の単語の背景色を灰色にするには、二つのバッククォート（``）を使う:
>




The crucial difference is the absence vs. presence of the topic marker `は`.
Possibility of omitting `ため` or `に` is dependent on this, and does not change
the meaning so much, if any.

  * A **(ため)には** is used for conditionals. It does not necessarily mean that `A` actually happened, but it means that whatever to follow is a necessary condition for `A` to happen. (There may be alternative ways to do it, but provided that context, that is the only salient way.) "in hope that A may happen, ...".

> 仕事で成功する **(ため)には** 、家で、喜んで私を助けてくれる夫が必要なのです。  
>  'If I were to succeed in my business career, I would need a husband at home
> who would be happy to help me.' (subjunctive)
>
> 花粉症を予防する **(ため)には** 、眼鏡やマスクをして花粉から目や鼻を守ることが重要です。  
>  'If you wanted to prevent hay fever, it is important to protect your eyes
> and nose from pollen by wearing glasses and a mask.
>
> 日本語の単語の背景色を灰色にする **(ため)には** 、二つのバッククォート（``）を使う。  
>  'If you wanted to change the background color of a Japanese word to gray,
> use two back quotes.

  * A **ため(に)** is used when you are sure that `A` will actually happen, or `A` already happened.

> 仕事で成功する **ため(に)** 、家で、喜んで私を助けてくれる夫が必要なのです。  
>  'I need a husband at home who would be happy to help me so that I can
> continue being successful in my business career.' (indicative)
>
> 花粉症を予防する **ため(に)** 、眼鏡やマスクをして花粉から目や鼻を守ることが重要です。  
>  'It is important to protect your eyes and nose from pollen by wearing
> glasses and a mask in order to prevent (the on going) hay fever.
>
> 日本語の単語の背景色を灰色にする **ため(に)** 、二つのバッククォート（``）を使う。  
>  'In order to change the background color of a Japanese word to gray (right
> now), use two back quotes.




The crucial difference is the absence vs. presence of the topic marker `は`.
Possibility of omitting `ため` or `に` is dependent on this, and does not change
the meaning so much, if any.

  * A **(ため)には** is used for conditionals. It does not necessarily mean that `A` actually happened, but it means that whatever to follow is a necessary condition for `A` to happen. (There may be alternative ways to do it, but provided that context, that is the only salient way.) "in hope that A may happen, ...".

> 仕事で成功する **(ため)には** 、家で、喜んで私を助けてくれる夫が必要なのです。  
>  'If I were to succeed in my business career, I would need a husband at home
> who would be happy to help me.' (subjunctive)
>
> 花粉症を予防する **(ため)には** 、眼鏡やマスクをして花粉から目や鼻を守ることが重要です。  
>  'If you wanted to prevent hay fever, it is important to protect your eyes
> and nose from pollen by wearing glasses and a mask.
>
> 日本語の単語の背景色を灰色にする **(ため)には** 、二つのバッククォート（``）を使う。  
>  'If you wanted to change the background color of a Japanese word to gray,
> use two back quotes.

  * A **ため(に)** is used when you are sure that `A` will actually happen, or `A` already happened.

> 仕事で成功する **ため(に)** 、家で、喜んで私を助けてくれる夫が必要なのです。  
>  'I need a husband at home who would be happy to help me so that I can
> continue being successful in my business career.' (indicative)
>
> 花粉症を予防する **ため(に)** 、眼鏡やマスクをして花粉から目や鼻を守ることが重要です。  
>  'It is important to protect your eyes and nose from pollen by wearing
> glasses and a mask in order to prevent (the on going) hay fever.
>
> 日本語の単語の背景色を灰色にする **ため(に)** 、二つのバッククォート（``）を使う。  
>  'In order to change the background color of a Japanese word to gray (right
> now), use two back quotes.

