G
Greg Maxey
I am seeing some really odd behavior while attempting to use
Dialogs(wdDialogFormatPageNumber) using Word2003
If I start a new instance of Word, display Headers and Footers, then use the
Format Page Number icon the Format Page Number dialog opens with the number
format set to "1, 2, 3 ..." I can apply that format and then apply insert
the page number and the correct format is displayed. If I press the Format
Page Number icon the dialog again opens with the format 1, 2, 3 displayed.
Now I can change the format:
Format selected Displayed in Document Displayed in dialog when opened
again
-1-, -2-, -3- -1- -1-, -2-, -3-
a, b, c a a, b, c
A, B, C A A, B, C
i, ii, iii i i, ii,
iii
I, II, III I I, II, III
All as expected.
Now if I open a new instance of Word, display Headers and Footer, and then
use the following macro code:
Sub Test()
Dim dlg As Dialog
Set dlg = Dialogs(wdDialogFormatPageNumber)
dlg.Show
Set dlg = Nothing
End Sub
the Format Page Number dialog opens with the number format set to "1, 2, 3."
I can apply that format and then apply insert the page number and the
correct format is displayed. If I run the macro the second time the dialog
opens again with the format 1, 2, 3 displayed. All is still good, but here
is where the problems start. If I change the format as follows, here is the
results:
Format selected Displayed in Document Displayed in dialog when opened
again
-1-, -2-, -3- I -1-, -2-, -3-
a, b, c i a, b, c
A, B, C A A, B, C
i, ii, iii a i, ii,
iii
I, II, III 1st I, II, III
In addition, if I set the format to -1-, -2-, -3- with the Format Page
Number icon and then display that dialog with the icon again it properly
shows -1-, -2-, -3- in the dialog number format fields. However, if I set
it to -1-, -2-, -3- using the icon and then display it again using the
macro, the dialog Number format field is blank.
I am stumped. Any ideas as to why this occurs?
Dialogs(wdDialogFormatPageNumber) using Word2003
If I start a new instance of Word, display Headers and Footers, then use the
Format Page Number icon the Format Page Number dialog opens with the number
format set to "1, 2, 3 ..." I can apply that format and then apply insert
the page number and the correct format is displayed. If I press the Format
Page Number icon the dialog again opens with the format 1, 2, 3 displayed.
Now I can change the format:
Format selected Displayed in Document Displayed in dialog when opened
again
-1-, -2-, -3- -1- -1-, -2-, -3-
a, b, c a a, b, c
A, B, C A A, B, C
i, ii, iii i i, ii,
iii
I, II, III I I, II, III
All as expected.
Now if I open a new instance of Word, display Headers and Footer, and then
use the following macro code:
Sub Test()
Dim dlg As Dialog
Set dlg = Dialogs(wdDialogFormatPageNumber)
dlg.Show
Set dlg = Nothing
End Sub
the Format Page Number dialog opens with the number format set to "1, 2, 3."
I can apply that format and then apply insert the page number and the
correct format is displayed. If I run the macro the second time the dialog
opens again with the format 1, 2, 3 displayed. All is still good, but here
is where the problems start. If I change the format as follows, here is the
results:
Format selected Displayed in Document Displayed in dialog when opened
again
-1-, -2-, -3- I -1-, -2-, -3-
a, b, c i a, b, c
A, B, C A A, B, C
i, ii, iii a i, ii,
iii
I, II, III 1st I, II, III
In addition, if I set the format to -1-, -2-, -3- with the Format Page
Number icon and then display that dialog with the icon again it properly
shows -1-, -2-, -3- in the dialog number format fields. However, if I set
it to -1-, -2-, -3- using the icon and then display it again using the
macro, the dialog Number format field is blank.
I am stumped. Any ideas as to why this occurs?