Hi Is there a VBA command to search a string for a specifik word? I create a string with the printername and I need different things to happen according to which default printer the user have selected. /Lasse
Hi Lasse, You could use the Instr function. For example, the following code tests returns 'True' if the active printer is the Adobe Acrobat distiller: Sub TestPrinter() MsgBox InStr(Application.ActivePrinter, "Adobe") > 0 End Sub -- Cheers macropod [MVP - Microsoft Word] "Lasse" wrote in message news:FDAAE9A7-C766-4DA0-9B42-8E5455FCCE09@microsoft.com... > Hi > > Is there a VBA command to search a string for a specifik word? > > I create a string with the printername and I need different things to happen > according to which default printer the user have selected. > > /Lasse