How to deal with single quote in Word VBA SQL query?

Where you specify two single quotes '', one will escape the other and will result in single, try to replace it like this:

customerName = Replace(customerName, "'", "''")

Leave a Comment