Yeah, Paramount & whoever their publisher is no longer accepts any unsolicited manuscripts for Trek stuff, I'm pretty sure Star Wars is the same. You pretty much have to be published and get their attention. Although in Star Trek Online (which works hand-in-glove with Paramount), they often have "official literary challenges" which might get someone's attention if you really knock out something Epic. It would be worth checking the "official" forums and fan clubs for the franchises you're interested in to see if they ever do anything like that.
In past years, they had some contests where fans could submit short stories, the best of which were compiled and published yearly, but I don't think they do that any more. They're trying to ensure the books stay consistant with not only the movie/series canon, but also the "soft canon" from countless books for the various trek shows.
Still, even if it's not to be "official", fanfic is a lot of fun to write and share with fellow fans, a number of The Big Trek Writers got their start writing for fanzines like Spockanalia. It can be a useful exercise to sharpen your Author's Tools. For example, if you learn to capture an iconic character's "voice" so readers hear the actor's voice in their head, and your on the way to constructing and depicting consistant character 'voices' for your original characters. Learning to describe worlds against which you've a seprate, independant basis for comparison, and you're on your way to building your own. Kind of like learning to draw or paint.
At least that's my take on it, my own experience in word herding is limited to bits for games and the odd splash of fanfic intended to be used as the backbone for some game arcs.