Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-14-2012, 04:17 AM
mosrozen mosrozen is offline create footnotes from custom text Mac OS X create footnotes from custom text Office 2003
Novice
create footnotes from custom text
 
Join Date: Jun 2012
Posts: 2
mosrozen is on a distinguished road
Default create footnotes from custom text

Hello,
I am looking to write a vb script that I will create notes for examples:
I'm looking for (this is important) long.


(this is important) is the text extract for the new footnote on page
in place of a parenthesis between the extraction of numbering etc. Note 1
Eric
(just at present I work on Advent 3b2 with his own programming language, now I want to turn to VB, if you know a good "manual"?)
Reply With Quote
  #2  
Old 06-14-2012, 06:42 AM
macropod's Avatar
macropod macropod is offline create footnotes from custom text Windows 7 64bit create footnotes from custom text Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Eric,

You could use a macro like:
Code:
Sub Demo()
Dim StrTxt As String
With ActiveDocument.Range
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "\(*\)"
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = True
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = True
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    .Execute
  End With
  Do While .Find.Found
    StrTxt = Mid(.Duplicate.Text, 2, Len(.Duplicate.Text) - 2)
    .Text = vbNullString
    .Footnotes.Add Range:=.Duplicate, Text:=StrTxt
    .Find.Execute
  Loop
End With
End Sub
As for vba coding resources, there are many web sites with tutorials, and you might one or two of them worth doing. Most are probably for Excel, though.

For a book, you might try something like 'The Secret Life of Word: A Professional Writer's Guide to Microsoft
Word Automation' by R Delwood. This isn't a programming book, per se, and doesn't profess to teach you how to program. Rather, it shows how to combine Word's various tools (including vba) to achieve whatever the desried result might be. The only reason I can suggest this book is that I did much of the technical review; I'm sure there are plenty of others out there. Another that I contributed to is 'Word Hacks', by A Savikas, but that one pre-dates Office 2007.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 06-14-2012, 06:59 AM
mosrozen mosrozen is offline create footnotes from custom text Mac OS X create footnotes from custom text Office 2003
Novice
create footnotes from custom text
 
Join Date: Jun 2012
Posts: 2
mosrozen is on a distinguished road
Default

hello,
thank you for your answer it's work fine.
i see for the manual
regards
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
create footnotes from custom text Convert custom mark footnotes peter961 Word VBA 9 09-04-2017 02:49 PM
need to create a custom field on each page Gurujot Word 13 09-20-2012 05:20 PM
Convert custom mark footnotes peter961 Word 0 01-30-2012 06:40 AM
Create Custom menu using a macro twnty2 PowerPoint 0 06-29-2011 04:26 PM
Create Custom Word Template emilyrogers Word 0 02-16-2011 05:46 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:08 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft