I am having an issue with code running on 2010 excel but not 2013. It opens up a word doc on a shared drive and fills the form out. I would like to know if any one has had this issue.
In both 2010 and 2013 version it opens the word doc but only in the 2010 does it fill out the form.
In both 2010 and 2013 version it opens the word doc but only in the 2010 does it fill out the form.
Code:
Set wd = GetObject(, "Word.Application")
If Err.Number <> 0 Then
Set wd = CreateObject("Word.Application")
End If
' ################################
' Word Activate
wd.Visible = True
AppActivate wd.Name
' ################################
If obco = True Then
With wd
documentoWord = "FORM - Change Order.doc"
.ChangeFileOpenDirectory Path
.Documents.Open filename:=documentoWord, ReadOnly:=True
' ################################
' ... and try to fill the form
.Selection.Goto(What:=wdGoToBookmark, Name:="Text4") = Sheets("User Settings").Range("D11")
.Selection.Goto(What:=wdGoToBookmark, Name:="Text24") = txtrequest & " / " & txtcrequest
.Selection.Goto(What:=wdGoToBookmark, Name:="Text6") = Format(Sheets("Filter").Range("O1"), "m/d")
.Selection.Goto(What:=wdGoToBookmark, Name:="Text3") = txtdate & " " & txttime
.Selection.Goto(What:=wdGoToBookmark, Name:="Text19") = txtchange
.Selection.Goto(What:=wdGoToBookmark, Name:="Text26") = txtcc
.Selection.Goto(What:=wdGoToBookmark, Name:="Text5") = txtcampus
.Selection.Goto(What:=wdGoToBookmark, Name:="Text7") = cbcat & "-" & txtqty
.Selection.Goto(What:=wdGoToBookmark, Name:="Text2") = titleName
End With
End If