I have managed to create code to create a new word doc, open the doc and insert text into the word doc header and footer; But I can't find a way to get a 'Page x of y' into the footer; The code that is generated by recording a macro in word to do this fails when that code is placed inside the excel code. Any ideas??
Both;
andCode:wdApp.NormalTemplate.AutoTextEntries("Page X of Y").Insert Where:=Selection.Range, RichText:=True
Both these seem to fail when the code is in Excel rather than in word?? Help??Code:wdApp.Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldPage wdApp.Selection.TypeText Text:=" of " wdApp.Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldNumPages
Last edited by Leith Ross; 03-02-2009 at 11:21 PM. Reason: Added Code Tags
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks