#1   Report Post  
Posted to microsoft.public.word.docmanagement
Poli Poli is offline
external usenet poster
 
Posts: 5
Default Replace Macro

Sorry guys but I figured it out

Sub Update6e100bb()
With ActiveDocument
If .FormFields("PtNo6E100BB").Result = "6E100BB191" Then
.FormFields("Descp6E100BB").Result = "Mount, 6E100 BACK TO BACK
W/1.91 SLEEVE"
ElseIf .FormFields("PtNo6E100BB").Result = "6E100BB406" Then
.FormFields("Descp6E100BB").Result = "Mount, 6E100 BACK TO BACK
W/4.06 SLEEVE"
ElseIf .FormFields("PtNo6E100BB").Result = "6E100BB475" Then
.FormFields("Descp6E100BB").Result = "Mount, 6E100 BACK TO BACK
W/4.75 SLEEVE"
End If
If .FormFields("PtNo6E100BB").Result = "6E100BB191" Then
.FormFields("PPK").Result = "6 or with nut 7"
ElseIf .FormFields("PtNo6E100BB").Result = "6E100BB406" Then
.FormFields("PPK").Result = "5 or with nut 6"
ElseIf .FormFields("PtNo6E100BB").Result = "6E100BB475" Then
.FormFields("PPK").Result = "5 or with nut 6"
End If
End With
End Sub
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Replace Macro

As an isolated post without any reference to what it concerns this is
meaningless ... but ugly

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Poli wrote:
Sorry guys but I figured it out

Sub Update6e100bb()
With ActiveDocument
If .FormFields("PtNo6E100BB").Result = "6E100BB191" Then
.FormFields("Descp6E100BB").Result = "Mount, 6E100 BACK TO BACK
W/1.91 SLEEVE"
ElseIf .FormFields("PtNo6E100BB").Result = "6E100BB406" Then
.FormFields("Descp6E100BB").Result = "Mount, 6E100 BACK TO BACK
W/4.06 SLEEVE"
ElseIf .FormFields("PtNo6E100BB").Result = "6E100BB475" Then
.FormFields("Descp6E100BB").Result = "Mount, 6E100 BACK TO BACK
W/4.75 SLEEVE"
End If
If .FormFields("PtNo6E100BB").Result = "6E100BB191" Then
.FormFields("PPK").Result = "6 or with nut 7"
ElseIf .FormFields("PtNo6E100BB").Result = "6E100BB406" Then
.FormFields("PPK").Result = "5 or with nut 6"
ElseIf .FormFields("PtNo6E100BB").Result = "6E100BB475" Then
.FormFields("PPK").Result = "5 or with nut 6"
End If
End With
End Sub



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro using Replace does not replace fofficecommunityk New Users 1 November 3rd 07 08:06 AM
Word 200 Macro using replace Daire Microsoft Word Help 5 December 13th 06 03:28 PM
macro or find/replace Janey Microsoft Word Help 2 May 22nd 06 05:15 PM
Find and Replace Macro David Ayers Microsoft Word Help 5 December 17th 05 02:46 AM
Set up find/replace in a macro Haydon Microsoft Word Help 3 June 29th 05 11:07 AM


All times are GMT +1. The time now is 12:54 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"