Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2008

Tip: Looking for answers? Try searching our database.

Help with error message

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ah - 04 Mar 2008 06:09 GMT
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.
Doug Robbins - Word MVP - 04 Mar 2008 10:39 GMT
You need to show us the code that you are using.

Signature

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

> Hi;
>
[quoted text clipped - 19 lines]
> Appreciate if someone could help on this urgently.
> Thanks in advance.
ah - 04 Mar 2008 10:56 GMT
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.

> You need to show us the code that you are using.
>
[quoted text clipped - 21 lines]
> > Appreciate if someone could help on this urgently.
> > Thanks in advance.
ah - 06 Mar 2008 07:18 GMT
Can anyone help me with this?
It is urgent. Thanks

> Ok, please refer to the following:
>
[quoted text clipped - 93 lines]
> > > Appreciate if someone could help on this urgently.
> > > Thanks in advance.
Doug Robbins - Word MVP - 12 Mar 2008 10:52 GMT
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.

Signature

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

> Ok, please refer to the following:
>
[quoted text clipped - 98 lines]
>> > Appreciate if someone could help on this urgently.
>> > Thanks in advance.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.