I have read through all similar postings, but none quite fit.

I'm trying to set up an order form with a "bill-to" and "ship-to" that may
or may not be the same. I have a few questions:

1) How do I use a check box labeled "Same" and have all the bill-to fields
(name, address, city, state, etc) auto fill in the ship-to fields. Sometimes
the bill-to and ship-to are not the same so I need to be able to track both
sets of data.

2) How do I track all data (whether the fields are changed or not)? Does the
solution to question 1 "overwrite" the fields if the data is the same?

3) I have set up my own macro, but in order for the form to work, it need to
be protected, and then if the form is protected, my macro errors, telling me
to unprotect the document. How do I get that to function properly?

Thanks in advance

Re: Auto fill and macros in a protected form by Greg

Greg
Thu Aug 03 16:43:14 CDT 2006

Say the billing name field was named "BName" and the shipping name field is
named "SName." You could run an on exit macro from the checkbox named
"Same."

Change "SomeOtherField to the field name that you want to skip to if the
same box is checked.

Sub OnExitSame()
Dim oFlds As FormFields
Set oFlds = ActiveDocument.FormFields
If oFlds("Same").CheckBox.Value = True Then
oFlds("SName").Result = oFlds("BName").Result
'Add other similiar field pairs here
oFlds("SomeOtherField").Select
Selection.Range.Fields(1).Result.Select
End If
End Sub


--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.


AllYourSpam wrote:
> I have read through all similar postings, but none quite fit.
>
> I'm trying to set up an order form with a "bill-to" and "ship-to"
> that may or may not be the same. I have a few questions:
>
> 1) How do I use a check box labeled "Same" and have all the bill-to
> fields (name, address, city, state, etc) auto fill in the ship-to
> fields. Sometimes the bill-to and ship-to are not the same so I need
> to be able to track both sets of data.
>
> 2) How do I track all data (whether the fields are changed or not)?
> Does the solution to question 1 "overwrite" the fields if the data is
> the same?
>
> 3) I have set up my own macro, but in order for the form to work, it
> need to be protected, and then if the form is protected, my macro
> errors, telling me to unprotect the document. How do I get that to
> function properly?
>
> Thanks in advance



Re: Auto fill and macros in a protected form by AllYourSpam

AllYourSpam
Fri Aug 04 09:49:02 CDT 2006

Thanks for your help so far, but it is not working properly. I have only
recorded macros before, never written the code, so I probably did something
wrong.

Here is what happens: The macro attempts to work, but it removes the data
from the bill-to fields, leaving them blank, and then does not write any data
to the ship-to fields, so I end up with all the fields blank. Then I get a
run-time error 5941 "the requested member of the collection does not exist"
when it tries to advance to the next field for manual entry again.

I have double checked the field names and they are all correct, so I'm not
sure what the problem is. Either way, that wouldn't answer the disappearing
data problem.

Here is my code. The last field should advance to a radio button - is that a
problem?

Sub OnExitSame()
Dim oFlds As FormFields
Set oFlds = ActiveDocument.FormFields
If oFlds("Same").CheckBox.Value = True Then
oFlds("ShopName").Result = oFlds("ShipTo").Result
oFlds("First").Result = oFlds("ShipToFirst").Result
oFlds("Middle").Result = oFlds("ShipToMiddle").Result
oFlds("Last").Result = oFlds("ShipToLast").Result
oFlds("HomeNo").Result = oFlds("ShipToHomeNo").Result
oFlds("WorkNo").Result = oFlds("ShipToWorkNo").Result
oFlds("CellNo").Result = oFlds("ShipToCellNo").Result
oFlds("Address").Result = oFlds("ShipToAddress").Result
oFlds("City").Result = oFlds("ShipToCity").Result
oFlds("State").Result = oFlds("ShipToState").Result
oFlds("Zip").Result = oFlds("ShipToZip").Result
oFlds("LiftGateYes").Select
Selection.Range.Fields(1).Result.Select
' Same Macro
' Macro recorded 8/4/2006 by CAC
End If
End Sub

Thanks so much, your help is greatly appreciated.
CAC

"Greg Maxey" wrote:

> Say the billing name field was named "BName" and the shipping name field is
> named "SName." You could run an on exit macro from the checkbox named
> "Same."
>
> Change "SomeOtherField to the field name that you want to skip to if the
> same box is checked.
>
> Sub OnExitSame()
> Dim oFlds As FormFields
> Set oFlds = ActiveDocument.FormFields
> If oFlds("Same").CheckBox.Value = True Then
> oFlds("SName").Result = oFlds("BName").Result
> 'Add other similiar field pairs here
> oFlds("SomeOtherField").Select
> Selection.Range.Fields(1).Result.Select
> End If
> End Sub
>
>
> --
> Greg Maxey/Word MVP
> See:
> http://gregmaxey.mvps.org/word_tips.htm
> For some helpful tips using Word.
>
>
> AllYourSpam wrote:
> > I have read through all similar postings, but none quite fit.
> >
> > I'm trying to set up an order form with a "bill-to" and "ship-to"
> > that may or may not be the same. I have a few questions:
> >
> > 1) How do I use a check box labeled "Same" and have all the bill-to
> > fields (name, address, city, state, etc) auto fill in the ship-to
> > fields. Sometimes the bill-to and ship-to are not the same so I need
> > to be able to track both sets of data.
> >
> > 2) How do I track all data (whether the fields are changed or not)?
> > Does the solution to question 1 "overwrite" the fields if the data is
> > the same?
> >
> > 3) I have set up my own macro, but in order for the form to work, it
> > need to be protected, and then if the form is protected, my macro
> > errors, telling me to unprotect the document. How do I get that to
> > function properly?
> >
> > Thanks in advance
>
>
>

Re: Auto fill and macros in a protected form by Greg

Greg
Fri Aug 04 14:53:51 CDT 2006

E-mail me your document. You should be able to cipher out the spam proofing
in my address.



--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

"AllYourSpam" <AllYourSpam@discussions.microsoft.com> wrote in message
news:219766BA-5AC3-452C-84BB-E8E9AC6A469E@microsoft.com...
> Thanks for your help so far, but it is not working properly. I have only
> recorded macros before, never written the code, so I probably did
> something
> wrong.
>
> Here is what happens: The macro attempts to work, but it removes the data
> from the bill-to fields, leaving them blank, and then does not write any
> data
> to the ship-to fields, so I end up with all the fields blank. Then I get a
> run-time error 5941 "the requested member of the collection does not
> exist"
> when it tries to advance to the next field for manual entry again.
>
> I have double checked the field names and they are all correct, so I'm not
> sure what the problem is. Either way, that wouldn't answer the
> disappearing
> data problem.
>
> Here is my code. The last field should advance to a radio button - is that
> a
> problem?
>
> Sub OnExitSame()
> Dim oFlds As FormFields
> Set oFlds = ActiveDocument.FormFields
> If oFlds("Same").CheckBox.Value = True Then
> oFlds("ShopName").Result = oFlds("ShipTo").Result
> oFlds("First").Result = oFlds("ShipToFirst").Result
> oFlds("Middle").Result = oFlds("ShipToMiddle").Result
> oFlds("Last").Result = oFlds("ShipToLast").Result
> oFlds("HomeNo").Result = oFlds("ShipToHomeNo").Result
> oFlds("WorkNo").Result = oFlds("ShipToWorkNo").Result
> oFlds("CellNo").Result = oFlds("ShipToCellNo").Result
> oFlds("Address").Result = oFlds("ShipToAddress").Result
> oFlds("City").Result = oFlds("ShipToCity").Result
> oFlds("State").Result = oFlds("ShipToState").Result
> oFlds("Zip").Result = oFlds("ShipToZip").Result
> oFlds("LiftGateYes").Select
> Selection.Range.Fields(1).Result.Select
> ' Same Macro
> ' Macro recorded 8/4/2006 by CAC
> End If
> End Sub
>
> Thanks so much, your help is greatly appreciated.
> CAC
>
> "Greg Maxey" wrote:
>
>> Say the billing name field was named "BName" and the shipping name field
>> is
>> named "SName." You could run an on exit macro from the checkbox named
>> "Same."
>>
>> Change "SomeOtherField to the field name that you want to skip to if the
>> same box is checked.
>>
>> Sub OnExitSame()
>> Dim oFlds As FormFields
>> Set oFlds = ActiveDocument.FormFields
>> If oFlds("Same").CheckBox.Value = True Then
>> oFlds("SName").Result = oFlds("BName").Result
>> 'Add other similiar field pairs here
>> oFlds("SomeOtherField").Select
>> Selection.Range.Fields(1).Result.Select
>> End If
>> End Sub
>>
>>
>> --
>> Greg Maxey/Word MVP
>> See:
>> http://gregmaxey.mvps.org/word_tips.htm
>> For some helpful tips using Word.
>>
>>
>> AllYourSpam wrote:
>> > I have read through all similar postings, but none quite fit.
>> >
>> > I'm trying to set up an order form with a "bill-to" and "ship-to"
>> > that may or may not be the same. I have a few questions:
>> >
>> > 1) How do I use a check box labeled "Same" and have all the bill-to
>> > fields (name, address, city, state, etc) auto fill in the ship-to
>> > fields. Sometimes the bill-to and ship-to are not the same so I need
>> > to be able to track both sets of data.
>> >
>> > 2) How do I track all data (whether the fields are changed or not)?
>> > Does the solution to question 1 "overwrite" the fields if the data is
>> > the same?
>> >
>> > 3) I have set up my own macro, but in order for the form to work, it
>> > need to be protected, and then if the form is protected, my macro
>> > errors, telling me to unprotect the document. How do I get that to
>> > function properly?
>> >
>> > Thanks in advance
>>
>>
>>



Re: Auto fill and macros in a protected form by AllYourSpam

AllYourSpam
Mon Aug 07 14:02:16 CDT 2006

See my e-mail with the same subject line. let me know if you don't get it.
Thanks CAC

"Greg Maxey" wrote:

> E-mail me your document. You should be able to cipher out the spam proofing
> in my address.
>
>
>
> --
> Greg Maxey/Word MVP
> See:
> http://gregmaxey.mvps.org/word_tips.htm
> For some helpful tips using Word.
>
> "AllYourSpam" <AllYourSpam@discussions.microsoft.com> wrote in message
> news:219766BA-5AC3-452C-84BB-E8E9AC6A469E@microsoft.com...
> > Thanks for your help so far, but it is not working properly. I have only
> > recorded macros before, never written the code, so I probably did
> > something
> > wrong.
> >
> > Here is what happens: The macro attempts to work, but it removes the data
> > from the bill-to fields, leaving them blank, and then does not write any
> > data
> > to the ship-to fields, so I end up with all the fields blank. Then I get a
> > run-time error 5941 "the requested member of the collection does not
> > exist"
> > when it tries to advance to the next field for manual entry again.
> >
> > I have double checked the field names and they are all correct, so I'm not
> > sure what the problem is. Either way, that wouldn't answer the
> > disappearing
> > data problem.
> >
> > Here is my code. The last field should advance to a radio button - is that
> > a
> > problem?
> >
> > Sub OnExitSame()
> > Dim oFlds As FormFields
> > Set oFlds = ActiveDocument.FormFields
> > If oFlds("Same").CheckBox.Value = True Then
> > oFlds("ShopName").Result = oFlds("ShipTo").Result
> > oFlds("First").Result = oFlds("ShipToFirst").Result
> > oFlds("Middle").Result = oFlds("ShipToMiddle").Result
> > oFlds("Last").Result = oFlds("ShipToLast").Result
> > oFlds("HomeNo").Result = oFlds("ShipToHomeNo").Result
> > oFlds("WorkNo").Result = oFlds("ShipToWorkNo").Result
> > oFlds("CellNo").Result = oFlds("ShipToCellNo").Result
> > oFlds("Address").Result = oFlds("ShipToAddress").Result
> > oFlds("City").Result = oFlds("ShipToCity").Result
> > oFlds("State").Result = oFlds("ShipToState").Result
> > oFlds("Zip").Result = oFlds("ShipToZip").Result
> > oFlds("LiftGateYes").Select
> > Selection.Range.Fields(1).Result.Select
> > ' Same Macro
> > ' Macro recorded 8/4/2006 by CAC
> > End If
> > End Sub
> >
> > Thanks so much, your help is greatly appreciated.
> > CAC
> >
> > "Greg Maxey" wrote:
> >
> >> Say the billing name field was named "BName" and the shipping name field
> >> is
> >> named "SName." You could run an on exit macro from the checkbox named
> >> "Same."
> >>
> >> Change "SomeOtherField to the field name that you want to skip to if the
> >> same box is checked.
> >>
> >> Sub OnExitSame()
> >> Dim oFlds As FormFields
> >> Set oFlds = ActiveDocument.FormFields
> >> If oFlds("Same").CheckBox.Value = True Then
> >> oFlds("SName").Result = oFlds("BName").Result
> >> 'Add other similiar field pairs here
> >> oFlds("SomeOtherField").Select
> >> Selection.Range.Fields(1).Result.Select
> >> End If
> >> End Sub
> >>
> >>
> >> --
> >> Greg Maxey/Word MVP
> >> See:
> >> http://gregmaxey.mvps.org/word_tips.htm
> >> For some helpful tips using Word.
> >>
> >>
> >> AllYourSpam wrote:
> >> > I have read through all similar postings, but none quite fit.
> >> >
> >> > I'm trying to set up an order form with a "bill-to" and "ship-to"
> >> > that may or may not be the same. I have a few questions:
> >> >
> >> > 1) How do I use a check box labeled "Same" and have all the bill-to
> >> > fields (name, address, city, state, etc) auto fill in the ship-to
> >> > fields. Sometimes the bill-to and ship-to are not the same so I need
> >> > to be able to track both sets of data.
> >> >
> >> > 2) How do I track all data (whether the fields are changed or not)?
> >> > Does the solution to question 1 "overwrite" the fields if the data is
> >> > the same?
> >> >
> >> > 3) I have set up my own macro, but in order for the form to work, it
> >> > need to be protected, and then if the form is protected, my macro
> >> > errors, telling me to unprotect the document. How do I get that to
> >> > function properly?
> >> >
> >> > Thanks in advance
> >>
> >>
> >>
>
>
>

Re: Auto fill and macros in a protected form by Greg

Greg
Mon Aug 07 15:20:58 CDT 2006

As of 1620 today I didn't get it. The last three letters of the
address is org

AllYourSpam wrote:
> See my e-mail with the same subject line. let me know if you don't get it.
> Thanks CAC
>
> "Greg Maxey" wrote:
>
> > E-mail me your document. You should be able to cipher out the spam proofing
> > in my address.
> >
> >
> >
> > --
> > Greg Maxey/Word MVP
> > See:
> > http://gregmaxey.mvps.org/word_tips.htm
> > For some helpful tips using Word.
> >
> > "AllYourSpam" <AllYourSpam@discussions.microsoft.com> wrote in message
> > news:219766BA-5AC3-452C-84BB-E8E9AC6A469E@microsoft.com...
> > > Thanks for your help so far, but it is not working properly. I have only
> > > recorded macros before, never written the code, so I probably did
> > > something
> > > wrong.
> > >
> > > Here is what happens: The macro attempts to work, but it removes the data
> > > from the bill-to fields, leaving them blank, and then does not write any
> > > data
> > > to the ship-to fields, so I end up with all the fields blank. Then I get a
> > > run-time error 5941 "the requested member of the collection does not
> > > exist"
> > > when it tries to advance to the next field for manual entry again.
> > >
> > > I have double checked the field names and they are all correct, so I'm not
> > > sure what the problem is. Either way, that wouldn't answer the
> > > disappearing
> > > data problem.
> > >
> > > Here is my code. The last field should advance to a radio button - is that
> > > a
> > > problem?
> > >
> > > Sub OnExitSame()
> > > Dim oFlds As FormFields
> > > Set oFlds = ActiveDocument.FormFields
> > > If oFlds("Same").CheckBox.Value = True Then
> > > oFlds("ShopName").Result = oFlds("ShipTo").Result
> > > oFlds("First").Result = oFlds("ShipToFirst").Result
> > > oFlds("Middle").Result = oFlds("ShipToMiddle").Result
> > > oFlds("Last").Result = oFlds("ShipToLast").Result
> > > oFlds("HomeNo").Result = oFlds("ShipToHomeNo").Result
> > > oFlds("WorkNo").Result = oFlds("ShipToWorkNo").Result
> > > oFlds("CellNo").Result = oFlds("ShipToCellNo").Result
> > > oFlds("Address").Result = oFlds("ShipToAddress").Result
> > > oFlds("City").Result = oFlds("ShipToCity").Result
> > > oFlds("State").Result = oFlds("ShipToState").Result
> > > oFlds("Zip").Result = oFlds("ShipToZip").Result
> > > oFlds("LiftGateYes").Select
> > > Selection.Range.Fields(1).Result.Select
> > > ' Same Macro
> > > ' Macro recorded 8/4/2006 by CAC
> > > End If
> > > End Sub
> > >
> > > Thanks so much, your help is greatly appreciated.
> > > CAC
> > >
> > > "Greg Maxey" wrote:
> > >
> > >> Say the billing name field was named "BName" and the shipping name field
> > >> is
> > >> named "SName." You could run an on exit macro from the checkbox named
> > >> "Same."
> > >>
> > >> Change "SomeOtherField to the field name that you want to skip to if the
> > >> same box is checked.
> > >>
> > >> Sub OnExitSame()
> > >> Dim oFlds As FormFields
> > >> Set oFlds = ActiveDocument.FormFields
> > >> If oFlds("Same").CheckBox.Value = True Then
> > >> oFlds("SName").Result = oFlds("BName").Result
> > >> 'Add other similiar field pairs here
> > >> oFlds("SomeOtherField").Select
> > >> Selection.Range.Fields(1).Result.Select
> > >> End If
> > >> End Sub
> > >>
> > >>
> > >> --
> > >> Greg Maxey/Word MVP
> > >> See:
> > >> http://gregmaxey.mvps.org/word_tips.htm
> > >> For some helpful tips using Word.
> > >>
> > >>
> > >> AllYourSpam wrote:
> > >> > I have read through all similar postings, but none quite fit.
> > >> >
> > >> > I'm trying to set up an order form with a "bill-to" and "ship-to"
> > >> > that may or may not be the same. I have a few questions:
> > >> >
> > >> > 1) How do I use a check box labeled "Same" and have all the bill-to
> > >> > fields (name, address, city, state, etc) auto fill in the ship-to
> > >> > fields. Sometimes the bill-to and ship-to are not the same so I need
> > >> > to be able to track both sets of data.
> > >> >
> > >> > 2) How do I track all data (whether the fields are changed or not)?
> > >> > Does the solution to question 1 "overwrite" the fields if the data is
> > >> > the same?
> > >> >
> > >> > 3) I have set up my own macro, but in order for the form to work, it
> > >> > need to be protected, and then if the form is protected, my macro
> > >> > errors, telling me to unprotect the document. How do I get that to
> > >> > function properly?
> > >> >
> > >> > Thanks in advance
> > >>
> > >>
> > >>
> >
> >
> >


Re: Auto fill and macros in a protected form by AllYourSpam

AllYourSpam
Tue Aug 08 11:22:02 CDT 2006

Yeah, I did get the .org part, but I will send the e-mail again. Thanks

"Greg Maxey" wrote:

> As of 1620 today I didn't get it. The last three letters of the
> address is org
>
> AllYourSpam wrote:
> > See my e-mail with the same subject line. let me know if you don't get it.
> > Thanks CAC
> >
> > "Greg Maxey" wrote:
> >
> > > E-mail me your document. You should be able to cipher out the spam proofing
> > > in my address.
> > >
> > >
> > >
> > > --
> > > Greg Maxey/Word MVP
> > > See:
> > > http://gregmaxey.mvps.org/word_tips.htm
> > > For some helpful tips using Word.
> > >
> > > "AllYourSpam" <AllYourSpam@discussions.microsoft.com> wrote in message
> > > news:219766BA-5AC3-452C-84BB-E8E9AC6A469E@microsoft.com...
> > > > Thanks for your help so far, but it is not working properly. I have only
> > > > recorded macros before, never written the code, so I probably did
> > > > something
> > > > wrong.
> > > >
> > > > Here is what happens: The macro attempts to work, but it removes the data
> > > > from the bill-to fields, leaving them blank, and then does not write any
> > > > data
> > > > to the ship-to fields, so I end up with all the fields blank. Then I get a
> > > > run-time error 5941 "the requested member of the collection does not
> > > > exist"
> > > > when it tries to advance to the next field for manual entry again.
> > > >
> > > > I have double checked the field names and they are all correct, so I'm not
> > > > sure what the problem is. Either way, that wouldn't answer the
> > > > disappearing
> > > > data problem.
> > > >
> > > > Here is my code. The last field should advance to a radio button - is that
> > > > a
> > > > problem?
> > > >
> > > > Sub OnExitSame()
> > > > Dim oFlds As FormFields
> > > > Set oFlds = ActiveDocument.FormFields
> > > > If oFlds("Same").CheckBox.Value = True Then
> > > > oFlds("ShopName").Result = oFlds("ShipTo").Result
> > > > oFlds("First").Result = oFlds("ShipToFirst").Result
> > > > oFlds("Middle").Result = oFlds("ShipToMiddle").Result
> > > > oFlds("Last").Result = oFlds("ShipToLast").Result
> > > > oFlds("HomeNo").Result = oFlds("ShipToHomeNo").Result
> > > > oFlds("WorkNo").Result = oFlds("ShipToWorkNo").Result
> > > > oFlds("CellNo").Result = oFlds("ShipToCellNo").Result
> > > > oFlds("Address").Result = oFlds("ShipToAddress").Result
> > > > oFlds("City").Result = oFlds("ShipToCity").Result
> > > > oFlds("State").Result = oFlds("ShipToState").Result
> > > > oFlds("Zip").Result = oFlds("ShipToZip").Result
> > > > oFlds("LiftGateYes").Select
> > > > Selection.Range.Fields(1).Result.Select
> > > > ' Same Macro
> > > > ' Macro recorded 8/4/2006 by CAC
> > > > End If
> > > > End Sub
> > > >
> > > > Thanks so much, your help is greatly appreciated.
> > > > CAC
> > > >
> > > > "Greg Maxey" wrote:
> > > >
> > > >> Say the billing name field was named "BName" and the shipping name field
> > > >> is
> > > >> named "SName." You could run an on exit macro from the checkbox named
> > > >> "Same."
> > > >>
> > > >> Change "SomeOtherField to the field name that you want to skip to if the
> > > >> same box is checked.
> > > >>
> > > >> Sub OnExitSame()
> > > >> Dim oFlds As FormFields
> > > >> Set oFlds = ActiveDocument.FormFields
> > > >> If oFlds("Same").CheckBox.Value = True Then
> > > >> oFlds("SName").Result = oFlds("BName").Result
> > > >> 'Add other similiar field pairs here
> > > >> oFlds("SomeOtherField").Select
> > > >> Selection.Range.Fields(1).Result.Select
> > > >> End If
> > > >> End Sub
> > > >>
> > > >>
> > > >> --
> > > >> Greg Maxey/Word MVP
> > > >> See:
> > > >> http://gregmaxey.mvps.org/word_tips.htm
> > > >> For some helpful tips using Word.
> > > >>
> > > >>
> > > >> AllYourSpam wrote:
> > > >> > I have read through all similar postings, but none quite fit.
> > > >> >
> > > >> > I'm trying to set up an order form with a "bill-to" and "ship-to"
> > > >> > that may or may not be the same. I have a few questions:
> > > >> >
> > > >> > 1) How do I use a check box labeled "Same" and have all the bill-to
> > > >> > fields (name, address, city, state, etc) auto fill in the ship-to
> > > >> > fields. Sometimes the bill-to and ship-to are not the same so I need
> > > >> > to be able to track both sets of data.
> > > >> >
> > > >> > 2) How do I track all data (whether the fields are changed or not)?
> > > >> > Does the solution to question 1 "overwrite" the fields if the data is
> > > >> > the same?
> > > >> >
> > > >> > 3) I have set up my own macro, but in order for the form to work, it
> > > >> > need to be protected, and then if the form is protected, my macro
> > > >> > errors, telling me to unprotect the document. How do I get that to
> > > >> > function properly?
> > > >> >
> > > >> > Thanks in advance
> > > >>
> > > >>
> > > >>
> > >
> > >
> > >
>
>

Re: Auto fill and macros in a protected form by AllYourSpam

AllYourSpam
Fri Aug 11 09:56:01 CDT 2006

To anyone that is interested, Greg did help me with a solution. He is
Phenomenal!
Thanks Greg,

CAC

"AllYourSpam" wrote:

> Yeah, I did get the .org part, but I will send the e-mail again. Thanks
>
> "Greg Maxey" wrote:
>
> > As of 1620 today I didn't get it. The last three letters of the
> > address is org
> >
> > AllYourSpam wrote:
> > > See my e-mail with the same subject line. let me know if you don't get it.
> > > Thanks CAC
> > >
> > > "Greg Maxey" wrote:
> > >
> > > > E-mail me your document. You should be able to cipher out the spam proofing
> > > > in my address.
> > > >
> > > >
> > > >
> > > > --
> > > > Greg Maxey/Word MVP
> > > > See:
> > > > http://gregmaxey.mvps.org/word_tips.htm
> > > > For some helpful tips using Word.
> > > >
> > > > "AllYourSpam" <AllYourSpam@discussions.microsoft.com> wrote in message
> > > > news:219766BA-5AC3-452C-84BB-E8E9AC6A469E@microsoft.com...
> > > > > Thanks for your help so far, but it is not working properly. I have only
> > > > > recorded macros before, never written the code, so I probably did
> > > > > something
> > > > > wrong.
> > > > >
> > > > > Here is what happens: The macro attempts to work, but it removes the data
> > > > > from the bill-to fields, leaving them blank, and then does not write any
> > > > > data
> > > > > to the ship-to fields, so I end up with all the fields blank. Then I get a
> > > > > run-time error 5941 "the requested member of the collection does not
> > > > > exist"
> > > > > when it tries to advance to the next field for manual entry again.
> > > > >
> > > > > I have double checked the field names and they are all correct, so I'm not
> > > > > sure what the problem is. Either way, that wouldn't answer the
> > > > > disappearing
> > > > > data problem.
> > > > >
> > > > > Here is my code. The last field should advance to a radio button - is that
> > > > > a
> > > > > problem?
> > > > >
> > > > > Sub OnExitSame()
> > > > > Dim oFlds As FormFields
> > > > > Set oFlds = ActiveDocument.FormFields
> > > > > If oFlds("Same").CheckBox.Value = True Then
> > > > > oFlds("ShopName").Result = oFlds("ShipTo").Result
> > > > > oFlds("First").Result = oFlds("ShipToFirst").Result
> > > > > oFlds("Middle").Result = oFlds("ShipToMiddle").Result
> > > > > oFlds("Last").Result = oFlds("ShipToLast").Result
> > > > > oFlds("HomeNo").Result = oFlds("ShipToHomeNo").Result
> > > > > oFlds("WorkNo").Result = oFlds("ShipToWorkNo").Result
> > > > > oFlds("CellNo").Result = oFlds("ShipToCellNo").Result
> > > > > oFlds("Address").Result = oFlds("ShipToAddress").Result
> > > > > oFlds("City").Result = oFlds("ShipToCity").Result
> > > > > oFlds("State").Result = oFlds("ShipToState").Result
> > > > > oFlds("Zip").Result = oFlds("ShipToZip").Result
> > > > > oFlds("LiftGateYes").Select
> > > > > Selection.Range.Fields(1).Result.Select
> > > > > ' Same Macro
> > > > > ' Macro recorded 8/4/2006 by CAC
> > > > > End If
> > > > > End Sub
> > > > >
> > > > > Thanks so much, your help is greatly appreciated.
> > > > > CAC
> > > > >
> > > > > "Greg Maxey" wrote:
> > > > >
> > > > >> Say the billing name field was named "BName" and the shipping name field
> > > > >> is
> > > > >> named "SName." You could run an on exit macro from the checkbox named
> > > > >> "Same."
> > > > >>
> > > > >> Change "SomeOtherField to the field name that you want to skip to if the
> > > > >> same box is checked.
> > > > >>
> > > > >> Sub OnExitSame()
> > > > >> Dim oFlds As FormFields
> > > > >> Set oFlds = ActiveDocument.FormFields
> > > > >> If oFlds("Same").CheckBox.Value = True Then
> > > > >> oFlds("SName").Result = oFlds("BName").Result
> > > > >> 'Add other similiar field pairs here
> > > > >> oFlds("SomeOtherField").Select
> > > > >> Selection.Range.Fields(1).Result.Select
> > > > >> End If
> > > > >> End Sub
> > > > >>
> > > > >>
> > > > >> --
> > > > >> Greg Maxey/Word MVP
> > > > >> See:
> > > > >> http://gregmaxey.mvps.org/word_tips.htm
> > > > >> For some helpful tips using Word.
> > > > >>
> > > > >>
> > > > >> AllYourSpam wrote:
> > > > >> > I have read through all similar postings, but none quite fit.
> > > > >> >
> > > > >> > I'm trying to set up an order form with a "bill-to" and "ship-to"
> > > > >> > that may or may not be the same. I have a few questions:
> > > > >> >
> > > > >> > 1) How do I use a check box labeled "Same" and have all the bill-to
> > > > >> > fields (name, address, city, state, etc) auto fill in the ship-to
> > > > >> > fields. Sometimes the bill-to and ship-to are not the same so I need
> > > > >> > to be able to track both sets of data.
> > > > >> >
> > > > >> > 2) How do I track all data (whether the fields are changed or not)?
> > > > >> > Does the solution to question 1 "overwrite" the fields if the data is
> > > > >> > the same?
> > > > >> >
> > > > >> > 3) I have set up my own macro, but in order for the form to work, it
> > > > >> > need to be protected, and then if the form is protected, my macro
> > > > >> > errors, telling me to unprotect the document. How do I get that to
> > > > >> > function properly?
> > > > >> >
> > > > >> > Thanks in advance
> > > > >>
> > > > >>
> > > > >>
> > > >
> > > >
> > > >
> >
> >