Access and Word 2013 upgrade issue


We are going through a process of updating our desktops to Office 2013 from 2010.

We have a set of documents located on a network drive running on a Server 2008

Within an Access DB there is a word control function (below) which opens up word documents

In Word 2010 it works fine but it doesnt work in 2013.

Function Private Sub General_Letter_02_Click() is called from a form populated with data that is required to merge to a read only copy of a word letter.

The error we receive using Word 2013 is -

“You are not allowed to edit this selection because it is protected.”

The code fail on line 8 of Public Sub WordReplace(FieldName As String, DataValue As Variant)

Private Sub General_Letter_02_Click()
1.      WordOpen "xm-General Letter 02.docx"
2.      WordReplace "<Client_File.Title>", Forms![Client File]![TITLE]
3.      WordReplace "<Client_File.First>", Forms![Client File]![first]
4.      WordReplace "<Client_File.Last>", Forms![Client File]![LAST]
5.      WordReplace "<Client_File.Company>", Forms![Client File]![Company]
6.      WordReplace "<Client_File.Address1>", Forms![Client File]![Address1]
7.      WordReplace "<Client_File.Address2>", Forms![Client File]![ADDRESS2]
8.      WordReplace "<Client_File.PostTown>", Forms![Client File]![PostTown]
9.      WordReplace "<Client_File.County>", Forms![Client File]![COUNTY]
10.      WordReplace "<Client_File.PostCode>", Forms![Client File]![PostCode]
11.      WordReplace "<Client_File.Title>", Forms![Client File]![TITLE]
12.      WordReplace "<Client_File.Last>", Forms![Client File]![LAST]
13.      WordReplace "<Client_File.ClientRef>", Forms![Client File]![ClientRef]
14.      WordReplace "<user_security.first_name>", GetCurrentUserFirstName()
15.      WordReplace "<user_security.last_name>", GetCurrentUserLastName()
16.      WordReplace "<user_security.Department>", GetCurrentDepartment()
17.      WordSaveAsTemporary
18.      WordShow
End Sub

Public Sub WordOpen(FileName As String)
1.      Set Word = CreateObject("Word.Application")
2.      Word.Documents.Open ("L:\word\datasafe letters\worddocs\" & FileName)
End Sub

Public Sub WordReplace(FieldName As String, DataValue As Variant)
1.      Dim myRange As Object
2.      If (IsNull(DataValue)) Then
3.      DataValue = ""
4.      End If

5.      Set myRange = Word.ActiveDocument.Content

6.      myRange.Find.Execute FindText:=FieldName, Forward:=True ', MatchCase:=False
7.      While (myRange.Find.Found = True)
8.      myRange.Text = DataValue

9.      Set myRange = Word.ActiveDocument.Content
10.      myRange.Find.Execute FindText:=FieldName, Forward:=True ', MatchCase:=False
11.      Wend
End Sub

timb551IT ManagerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ste5anSenior DeveloperCommented:
Is this code a Word macro or code run from Access?

btw, use always Option Explicit..
David L. HansenCEOCommented:
As a test only, see if lowering your UAC to its lowest setting helps.
timb551IT ManagerAuthor Commented:
VB code within Access.

I will try the UAC tomorrow, thanks
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

timb551IT ManagerAuthor Commented:
changing UAC didnt make a difference.
timb551IT ManagerAuthor Commented:
No help on this.  Issue still unresolved.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
timb551IT ManagerAuthor Commented:
Issue not resolved but no help here.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.