Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Teacher needs help Macros Word 2007 Inserting Text in Header  (Read 2472 times)

0 Members and 1 Guest are viewing this topic.

meccagza

    Topic Starter


    Greenhorn

    • Experience: Beginner
    • OS: Unknown
    Teacher needs help Macros Word 2007 Inserting Text in Header
    « on: November 19, 2011, 11:33:36 PM »
    I have been having problems with more than half my machines, some are laptops and some are networked desktop computers.  I am having my students record macros for basic formatting.  Half the tasks we try give us errors.  I have had a particular problem with inserting the student name into the header of the document.  They need to be able to do this in particular because they are taking Cambridge Exams and might be asked to do it.  The first line is the line of code that is highlighted and gives us errors:

    ActiveDocument.AttachedTemplate.BuildingBlockEntries(" Blank").Insert_Where:=Selection.Range, RichText:=True
    Selection.Delete Unit:=wdCharacter, Count:=1
    Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
    Welection.TypeText Text:="Student Name "

    Please help !