B
btmcfadden
I am trying to update docvariables in a word document from Access. This code
will update the variables on the second page but does not update the variable
on the first page - when I am in the footer it is labeled "section1"... Why
is this not working??
If (strApproval) = "Yes" Then
'edits and updates footer field for docname
oDoc.Variables("TCSName").Value = strName
oDoc.Variables("FirstVersion").Value = strVersion
oDoc.Variables("FVersion").Value = strVersion
oDoc.Sections(1).Footers(wdHeaderFooterPrimary).Range.Fields.Update
'sets default path
oApp.Options.DefaultFilePath(wdDocumentsPath) = "C:\"
oApp.ActiveDocument.Save
oApp.Quit
Set oDoc = Nothing
Set oApp = Nothing
GoTo Exit1:
End If
will update the variables on the second page but does not update the variable
on the first page - when I am in the footer it is labeled "section1"... Why
is this not working??
If (strApproval) = "Yes" Then
'edits and updates footer field for docname
oDoc.Variables("TCSName").Value = strName
oDoc.Variables("FirstVersion").Value = strVersion
oDoc.Variables("FVersion").Value = strVersion
oDoc.Sections(1).Footers(wdHeaderFooterPrimary).Range.Fields.Update
'sets default path
oApp.Options.DefaultFilePath(wdDocumentsPath) = "C:\"
oApp.ActiveDocument.Save
oApp.Quit
Set oDoc = Nothing
Set oApp = Nothing
GoTo Exit1:
End If