Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-06-2023, 10:57 PM
pctechtv pctechtv is offline Save file dynamically with suffix Windows 10 Save file dynamically with suffix Office 2016
Novice
Save file dynamically with suffix
 
Join Date: Apr 2017
Posts: 3
pctechtv is on a distinguished road
Default Save file dynamically with suffix

I need a Macro that can save a Word document based on data from a text file. This is because the data will be set dynamically in the Text file on a hard drive. The only thing it needs is a file path. One tricky part is I want it to count the files in the directory and append 0001 to the first file and then 0002, 0003, and 0004, respectively.

For example, in directory C:\Temp I wil have a file name worddocs.txt. That file only will contain a base file path. e.g. C\myDocs\wordsOfWisdon.docx. That is, until it is appended with the file names. Each time it saves, it should be appended with 0001, 0002, 0003... So the file name would be wordsOfWisdon0001.docx. I want a button to press and save it with this filename.
I have tried some VBA in the past, but I do not know about accessing the external text file. Thanks for any help.
Reply With Quote
 

Tags
dynamic content, save, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Save file dynamically with suffix Different suffix per entry Dave T Excel Programming 5 04-02-2020 12:17 AM
Title and Suffix in contacts narvan21 Outlook 0 12-22-2017 02:00 AM
Save file dynamically with suffix Have Powerpoint dynamically update from an excel or other file? oshkosh PowerPoint 3 04-05-2016 06:10 AM
Save file dynamically with suffix save dialog box promt doesn't save file brmveen Word VBA 2 11-04-2015 12:51 AM
Macro to rename multiple Word file with same suffix ozil61 Word VBA 2 05-06-2014 07:36 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:52 PM.


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