P
Poli
Sorry forgot to tell you vital information, using Microsoft Word 2007,
running with XP.
I can't get this macro to work. I am trying to get it to work by entering
into two different fields based on what it reads in "PtNo6E100BB". Is this
possible. I know it works with one field but can't get it to work with two
different fields. Please help.
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"
ElseIf .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
Was this post helpful to you?
running with XP.
I can't get this macro to work. I am trying to get it to work by entering
into two different fields based on what it reads in "PtNo6E100BB". Is this
possible. I know it works with one field but can't get it to work with two
different fields. Please help.
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"
ElseIf .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
Was this post helpful to you?