Ok, I'm new to VSTO programming, and I'm working on a project using it. Basicly what I'm trying to do is setup a command bar with a button that saves form data from a form, and saves a copy of the form in a specified directory. This button will be used with several different forms, so a config...
This code
Sub CheckBox31_Click()
Dim r As Word.Range
' for footers 1 = wdHeaderFooterPrimary
Set r = ActiveDocument.Sections(1).Footers(1).Range
If CheckBox31 = True Then
With r
.Text = "Draft Copy "
.Collapse Direction:=wdCollapseEnd
End With...
The one that I quoted there where I said I finally ended up using this solution. It looked at first as if it would work, until I realized that all the pages were 1.
I gave your solution a whirl and it didn't work either, so I may be back to square one.
I finally ended up using this solution
Private Sub CheckBox31_Click()
With ActiveDocument.Sections(1)
Dim CurPage As String
Dim TtlPgs As String
CurPage = Selection.Information(wdActiveEndPageNumber)
TtlPgs = Selection.Information(wdNumberOfPagesInDocument)
If CheckBox31 = True...
My apologies. I am working in Word.
The funtion looks like this:
Private Sub CheckBox31_Click()
With ActiveDocument.Sections(1)
CurPage = Selection.Information(wdActiveEndPageNumber)
TtlPgs = Selection.Information(wdNumberOfPagesInDocument)
If CheckBox31 = True Then...
I am working on a form, and the form includes a checkbox that changes the wording of the footer. How do I insert the Page X of Y page numbering format from within my VBA Function?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.