cassmallbusiness.blogg.se

Word footer page x of y
Word footer page x of y












word footer page x of y

MyName = Left(oDoc.Name, (InStrRev(oDoc.Name, ".") - 1))Įxt = Right(oDoc.Name, Len(oDoc.Name) - InStrRev(oDoc.Name, ".")) Private Sub BackupDoc(ByVal oDoc As Document) I did manage to find a macro to insert the "Page x of y", but the problem is when it's ran multiple times like it would if saved multiple times, then it keeps adding a new "Page x of y" into the footer. I have it working in Excel with very minimal code, but Word is a whole new monster to me. I cannot believe how stuck I am with such a simple thing as inserting the footer, but I cannot figure it out after many searches and trials. I am currently trying to automatically insert the "file name_current date" in the left footer along with the "Page x of y" in the center footer. This way I can link to the document without getting a broken link each save. But my goal is to keep the name of the master file the same while only changing the footer during a save. Both of these functions are working fine. I have a macro saving a backup copy of the master file into a new folder called "Archive" and then it also saves a PDF version of the master document in the same directory as the master.

word footer page x of y

This is an extension of that same project, and I am stuck again.

word footer page x of y

Also, the date in the footer is behaving the way I want it to but I'll keep your suggestion for that in mind.I had very good results with this forum a few days ago with saving a backup copy into a new folder (thanks to Gmayor's awesome code), so I thought I would ask post another question. My mailmerge main document is one page but it contains eight records so the > field won't work (I tried it just to see how it would work). Since I didn't record it, how do I assign the already created (by you) macro to a button? I would imagine that the button would be accessible from any Word doc so my users could click it in the completed merged file. I see that if I had recorded the macro (which I didn't), I could have assigned a keyboard shortcut to the macro or assigned the macro to a button. I know how to do this in Access but have never done it in Word.

word footer page x of y

Now my problem is how and where to create the button to activate the macro. I decided that approach was safer than putting the code in the Normal.dotm file since that file might be recreated by Word if it ever got corrupted. It is now available in all Word documents. dotm file and placed that file in the Word 2010 startup folder (on my computer, as a test).














Word footer page x of y