Professional Documents
Culture Documents
VBA No FrontPage
VBA No FrontPage
VBA No FrontPage
Introduction
This article gives you an introduction to VBA in FrontPage.
This is working code, not optimized and not very reusable, but useful for learning purposes, and getting the job done. First I obtain the ActiveDocument object, then I obtain the first table. I know that the table I want to work with is the first on the page so I use fpDoc.all.tags("table")(0) to obtain the first table on my page. Since I want to write smarter code in the future, I set the Id for this table to "menu". Then I go through a two step process, to obtain the first row in the table, then the first cell in the row. Once I have this cell I check to see that the contents are "ATL & COM Notebook", to make sure I am changing the right text. Now I change the text inside the "<I> tags to "Components Notebook".