I'm part of a church and we are looking to record sermons using a laptop and our sound desk. Everything works fine until we connect the laptop to mains power. Searching on Google I found this post which explains the problem is to do with some sort of voltage issue. Is there anything except for running the laptop off batteries that could fix the problem? I am connecting using a standard RCA to 3.5" cable running from the monitor out on the sound desk to the microphone connector on the laptop.
That's a well-known problem.
First of all, you shouldn't be using the microphone connector on the laptop. These inputs are usually not only particularly susceptible to buzzing noises, but also to all kinds of distortion and aliasing. Use an external audio interface, there are very affordable USB ones available.
Using an interface with XLR inputs, connected to the mixer with balanced (!) microphone or TRS cables, the problem will probably be solved already. If not or there are no balanced outputs available on the mixer, you can use a DI-box to both balance and ground-lift an unbalanced pair of outputs, or you can try to use an unbalanced connection directly (some interfaces somehow manage to get even that working with hardly any of the buzzing).
Of course, it would be better to fix the problem right at the source, which is the laptop's switching power supply. I tried this once. The main trouble would appear to be that the ground connection runs straight past the switching circuitry,
Phase ─────────────────┆──Switching circ.──┆────────────────── +
Mains ┆ Power supply ┆ Laptop
Ground ─────────────────┆─────────┴─────────┆────────────────── Ground
there picking up a lot of the transients. This can be avoided by putting the power supply in a "loop", like
│ ┆ Power supply ┆ │
│ ┌───────┆─────────┴─────────┆─── │
│ │ ╰┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄╯ │
│ │ │
│ │ │
Phase ──────┘ │ └────────── +
Mains │ Laptop
Ground ─────────┴────────────────────────────────────────────────── Ground
which does however not quite suffice, some noise still seems to be introduced to the ground loop back from the DC output. This should however be fixable with a fat inductor in that line, but I haven't tried that yet.