Re: Help with error message by Doug
Doug
Wed Mar 12 02:52:13 PDT 2008
I am not sure why you have a mixture of formfields and a userform. I would
do it all with a userform (in a template) and have the user create a new
document from that template. I am pretty sure that if you do it that way,
your problems will go away.
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
"ah" <ah@discussions.microsoft.com> wrote in message
news:46A3A9D2-88C4-4B36-946B-149D3C83B5C6@microsoft.com...
> Ok, please refer to the following:
>
> Macro 1(Allowances Macro):
> ---------
> Sub Allowances() 'fills text field based on content of _dropdown field
>
> Dim oFld As FormFields
> Set oFld = ActiveDocument.FormFields
> Select Case oFld("Country_Name").Result
>
> Case Is = "AUSTRALIA"
> oFld("Allowance1").Result = "Car Allowance (IT14-6T01)"
> oFld("Allowance2").Result = "Notional Salary Percentage (IT14-4T19)"
>
> 'IT185
> oFld("ID1").Result = "185-04 Work Permit"
> oFld("ID2").Result = "185-10 Passport"
> oFld("ID3").Result = "185-45 UID/MIN number- US Benefits ID"
> oFld("ID4").Result = "185-50 USA Social Security Number"
>
>
> Case Else
> 'Do nothing
> End Select
> End Sub
>
> Macro 2: Personnel Area Macro:
> ---------------------------------------
>
> Sub PersonnelAreaMacro()
> PersonnelArea.Show
> End Sub
>
> User Form (Personnel Area):
> -------------
> Private Sub UserForm_Initialize()
> Dim myArray1() As String 'AUSTRALIA
>
> myArray1 = Split("ADE2(AU02-Adelaide) AUC1(NZ01-Auckland)
> BRI2(AU02-Brisbane) CAN2(AU02-Canberra) MEL2(AU02-Melbourne)
> MEL3(AU03-Melbourne) PER2(AU02-Perth) SYD2(AU02-Sydney) SYD3(AU03-Sydney)
> WEL0(NZ01-Welington)")
>
> Me.PersonnelArea.Clear
> Select Case ActiveDocument.FormFields("Country_Name").Result
> Case "AUSTRALIA"
> Me.PersonnelArea.List = myArray1
>
> End Select
> End Sub
>
> Private Sub OK_Click()
> ActiveDocument.FormFields("PersonnelArea").Result = Me.PersonnelArea.Text
> ActiveDocument.Bookmarks("PersonnelArea").Range.Fields(1).Result.Select
> Unload Me
> End Sub
>
> Private Sub Reset_Click()
> ActiveDocument.FormFields("PersonnelArea").Result = " "
> ActiveDocument.Bookmarks("PersonnelArea").Range.Fields(1).Result.Select
> Unload Me
> End Sub
>
> -----------------------------------
> Basically, above are just 2 of the user form and macro that I'm having in
> the form now. The Allowances macro was run as the "entry macro" of the
> Country_Name field. While the Personnel Area Macro was run as the "entry
> macro" when I click on the "Personnel Area" field
>
> I did not get the error when after I save and open the document for
> several
> times. However, the user is getting the error message and the personnel
> area
> that they have entered went missing after they get the error message.
>
> "Doug Robbins - Word MVP" wrote:
>
>> You need to show us the code that you are using.
>>
>> --
>> Hope this helps.
>>
>> Please reply to the newsgroup unless you wish to avail yourself of my
>> services on a paid consulting basis.
>>
>> Doug Robbins - Word MVP
>>
>> "ah" <ah@discussions.microsoft.com> wrote in message
>> news:ACA36F37-7D2B-4EF4-A9C8-2707DC0185DC@microsoft.com...
>> > Hi;
>> >
>> > Can anyone help me with the following:
>> >
>> > I've created a form with some built in macro which allow the user to
>> > get
>> > different selection list when they select different country. It works
>> > well
>> > at
>> > my end. However, when the user fills in and save the form, they will
>> > get a
>> > prompted message as follows when they open the form later:
>> >
>> > Error message:
>> > Do you want to merge cahnges in "alice-01Mar 2008.doc" back into
>> > D:\Profiles\Alice\Desktop\New Hires-IDL\Alice-01Mar 2008.doc"?
>> >
>> > There are 3 selections available after the user got the above prompted
>> > message (Yes, No or No and don't ask again)
>> >
>> > Some of the data that they have filled and saved previously will be
>> > missing
>> > after they get the above message.
>> >
>> > Appreciate if someone could help on this urgently.
>> > Thanks in advance.
>>
>>
>>