I hope someone can help me to understand the correct use of the preposition in this case:

In my book it says "to work with a company". Is it also correct to say "I work for IBM" or "I've worked at BMW" for 5 years"? Are there any differences or connotations?

Thanks in advance.

1 2
Usually, the speaker is using those prepositions synonymously. With can also be used when you are not an employee per se, but on contract or a partner, for instance. For suggests that the speaker is thinking of the corporate body that employs him/her, while at suggests that the speaker may be thinking of the office or location as he speaks; but for all practical purposes, s/he probably intends to communicate the same fact: 'I am an employee of IBW'.
I'd like to go a step further than Mr. M. on the "work with" comment. If I am an employee of the company, despite what your book says, it sounds wrong (to me) to say you work "with" them. If I were a consultant and the company was my client, I might use with.
Students: We have free audio pronunciation exercises.

I may be going off on a tangent, but you can say I am with IBM, meaning I work for IBM.

Best wishes, Clive
Yes, you can. I'm with Apple, I'm with so-and- so company, and most people will understand that you work for Apple, or for so-and-so company
I'd like to go on with this discussion of prepositions with 'company'. Nowadays far too many sources including teaching materials illustrate the use of 'in' in phrases like 'I work in IBM', 'They work in a company'. As far as I know this preposition has got a more 'physical' connotation meaning 'inside the walls of the organisation you work for'. Or could I be mistaken? Please, send your comments on this.
Site Hint: Check out our list of pronunciation videos.
"I work in [CompanyName]" sounds wrong to me.

But, for me, "work in" is possible like this:

I work at a hardware store. I work in plumbing. (=I work in the plumbing department.)

It does sound wrong to me too, but I come across the use of 'I work IN the company' in the teaching materials from Macmillan and this puzzles me a lot... The only thing I can think of is the street language is now moving onto pages and you can't just brush away from it.
Thank-you for your explanation on te prepositions used with the the word work. Excellent!
Teachers: We supply a list of EFL job vacancies
Show more