DIGIT-ARC read-only archive · snapshot: July 23, 2026

Word/Excel Macro thread

3 posts · originally from https://geek.digit.in/community/threads/word-excel-macro-thread.3904/

sms_solver
sms_solver Original post #1
Dec 22, 2004 at 11:17 PM
I have started this thread so that one can put code or links for intresting and useful macros for MS Office product.

Here is my contribution -- A word Macro

Click Tools > Macro > Macros …, a Macro dialog box will appear. Type ListFonts at new Marco name and click on Create Button. This will open Visual Basic Editor. Write following code as shown in the picture and then save and close Visual Basic Editor. Now run the macro and see what happens – it displays all the fonts in their respective fontface. :lol:

*www.geocities.com/lowlowlownp/m_listfonts.gif

-----------------------------------------
If anybody have such useful macros for word/excel, plz give the link or code!
sms_solver
Dec 24, 2004 at 11:36 PM
This is yet another word macro which finds C or C++ comments that starts with /* and ends with */. This is just an example to show how a pattern can be searched and manipulated.

Code:
Sub FindComments()
'
' FindComments Macro created by sms_solver on 12/24/2004
' USE: This macro finds C or C++ multiline comments in a document and
'      change its color and make it italic

Dim findYes As Boolean

'Goto top of the document
Selection.HomeKey Unit:=wdStory
Do
    findYes = Selection.Find.Execute("/\*?*?\*/", , , True)
    Selection.Font.Italic = True
    Selection.Font.Color = wdColorDarkBlue
Loop While findYes

End Sub

8)
sms_solver
Apr 26, 2005 at 3:01 AM
No body to post useful macros