haserexo.blogg.se

Where is find and replace in word
Where is find and replace in word







  1. Where is find and replace in word serial number#
  2. Where is find and replace in word serial#

'Set the default printer back to what it was before. SearchAndRep "serialtext", strReadCompSN, WordApp SearchAndRep "nametext", strReadCompName, WordApp

Where is find and replace in word serial#

'Procedures to edit the Word Document to add name and serial number.

Where is find and replace in word serial number#

'Read in name and serial number to print on label. 'Create a Microsoft Word Object and make it invisible. ObjNetwork.SetDefaultPrinter(WSHPrinters.Item(counter +1)) WScript.Echo(WSHPrinters.Item(counter +1))

where is find and replace in word

If Left(WSHPrinters.Item(counter +1), 5) = "Zebra" Then Set WSHPrinters = objNetwork.EnumPrinterConnectionsįor counter = 0 To WSHPrinters.Count - 1 Step 2 Set objNetwork = CreateObject("WScript.Network") 'Enumerate through printers to find local Zebra printer. Sub SearchAndRep(searchTerm, replaceTerm, WordApp) 'Procedure to edit word document add name and serial number. All I had to do was add another statement to move the cursor back to the beginning. StrReadCompSN = InputBox("Enter Serial Number", "Serial")

where is find and replace in word

StrReadCompName = InputBox("Enter Computer Name", "Name") WordApp.Documents("LabelTemplate.doc").Activate Set WordApp = CreateObject("Word.Application") Could anyone have a look and see what I might be doing wrong? Option Explicit It does the first replacement just fine, but not the second. To launch the Find/Replace tab, either use the keyboard shortcut Ctrl-F or choose Edit, Find and Replace from the menu at the top of the DrJava window. I don't have too much experience with VB Scripting but I'm trying to write something that will search for a specific string in a word document, replace it with whatever I specify and then print it out on a label printer.









Where is find and replace in word