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 !