Hi,
How can I determine if a number is odd or even? I am using the following code to determine my page numbers in a word document, but I need to know if the number is odd or even.
Dim lPageCnt As Long, lPgNr As Long
lPageCnt = oWordApplication.ActiveDoc
ument.Comp
uteStatist
ics(WdStat
istic.wdSt
atisticPag
es)
For lPgNr = 1 To lPageCnt
Call oWordApplication.Selection
.GoTo(WdGo
ToItem.wdG
oToPage, , , CStr(lPgNr))
With oWordApplication.ActiveDoc
ument.Shap
es.AddLine
(307, 73, 307, 709).Line
.DashStyle = Microsoft.Office.Core.MsoL
ineDashSty
le.msoLine
Solid
End With
Next lPgNr
Thanks
Start Free Trial