Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 12-02-2020, 02:47 PM
Guessed's Avatar
Guessed Guessed is offline autofldupdt macro - Modifying to keep part of file name Windows 10 autofldupdt macro - Modifying to keep part of file name Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,185
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Your code is removing the file extension from the name but you don't replace it with xlsx. I would set the name by

' Set the new filename
NewFile = Replace(ActiveDocument.Name, ".docx", ".xlsx")
NewFile = Replace(NewFile, "Final Report", "Tables")

I assume your code includes looping through all story ranges but you haven't shown us that outer loop. If that is the case then it will hit all footers as well.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Corrupted Footnotes After Modifying File on Macbook! MusculaR_MinD Word 3 12-12-2019 06:09 PM
autofldupdt macro - Modifying to keep part of file name macro to change part of the name of an existing Word file justinmo Word VBA 2 09-11-2018 06:08 PM
Modifying RTF File in MS Word 2007 Nickster Word VBA 2 12-02-2015 11:33 PM
autofldupdt macro - Modifying to keep part of file name Copying a part of a docx file as a separate file officeboy09 Word 6 09-26-2014 05:15 PM
autofldupdt macro - Modifying to keep part of file name modifying a PST file ctspwc Outlook 5 11-17-2010 09:29 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:33 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft