PDA

View Full Version : Footnote Problem



alucardiume
01-29-2012, 11:16 AM
Hi guys. im just new at VBA and wanted to know how this work...

This is my code.. The problem is the macro 3...
Sub Macro1()
'
' Macro1 Macro
'
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find.Font
.Size = 16
.Bold = True
.Superscript = True
.Subscript = False
End With
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.Cut
End Sub
Sub Macro2()
'
' Macro2 Macro
'
'
Selection.TypeBackspace
Selection.TypeText Text:=vbTab
End Sub
Sub Macro3()
'
' Macro3 Macro
'
'
With Selection
With .FootnoteOptions
.Location = wdBottomOfPage
.NumberingRule = wdRestartContinuous
.StartingNumber = 1
.NumberStyle = wdNoteNumberStyleArabic
End With
.Footnotes.Add Range:=Selection.Range, Reference:=""
End With
End Sub

macro functions.
macro 3 will create a footnote at a selected word but the numbering of the footnote is the problem.

I have problem at my macro code.. im trying to find a way how to insent my cut(Ctrl+c) word to insert it in Reference "in ms word its the custom mark of the footnote, means you define what to put in it and if you leave it blank it will generate a sequence numbering 1- 100 or more (i colored it red)" anyone knows how can i put the word that i cut to the reference.?

more POWER..

alucardiume
01-30-2012, 08:10 PM
Hi guys. im just new at VBA and wanted to know how this work...

This is my code.. The problem is the macro 3...
Sub Macro1()
'
' Macro1 Macro
'
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find.Font
.Size = 16
.Bold = True
.Superscript = True
.Subscript = False
End With
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.Cut
End Sub
Sub Macro2()
'
' Macro2 Macro
'
'
Selection.TypeBackspace
Selection.TypeText Text:=vbTab
End Sub
Sub Macro3()
'
' Macro3 Macro
'
'
With Selection
With .FootnoteOptions
.Location = wdBottomOfPage
.NumberingRule = wdRestartContinuous
.StartingNumber = 1
.NumberStyle = wdNoteNumberStyleArabic
End With
.Footnotes.Add Range:=Selection.Range, Reference:=""
End With
End Sub

macro functions.
macro 3 will create a footnote at a selected word but the numbering of the footnote is the problem.

I have problem at my macro code.. im trying to find a way how to insent my cut(Ctrl+c) word to insert it in Reference "in ms word its the custom mark of the footnote, means you define what to put in it and if you leave it blank it will generate a sequence numbering 1- 100 or more (i colored it red)" anyone knows how can i put the word that i cut to the reference.?

more POWER..
the macro cut(ctrl+x)"sorry for putting ctrl+c that was copy" it looks like this.

Macro4 Macro
Selection.Cut
End Sub

i tryed this one think it will work.. but its fail..

.Footnotes.Add Range:=Selection.Range, Reference:=Selection.Cut

anyone knows how to edit ms word 2010 macro.

i really need to know this.. i have to work 10K footnoote this might save me sometime.

the whole macro i made was to just basic of searching font size 16, bold and superscript. i change all the footnote to other fonts so i can find them easy. The hard part is they are still normal text so i have to refootnote them all. need help.

Thanks

alucardiume
01-30-2012, 09:06 PM
[Thread Closed] Problem solved. Im really stupid. Y_Y thanks to Microsoft
Word Object Model Reference