Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-07-2013, 03:18 PM
VBNation VBNation is offline Macro to create new word doc and save the file using String found in the document Windows 7 32bit Macro to create new word doc and save the file using String found in the document Office 2010 32bit
Novice
Macro to create new word doc and save the file using String found in the document
 
Join Date: Feb 2013
Posts: 2
VBNation is on a distinguished road
Default Macro to create new word doc and save the file using String found in the document

Hello world!



I'm BRAND spanking new here and to VBA for Word. I am fairly well versed in Excel VBA, but I have run into a situation where I need to automate something via Word and am looking for a little guidance.

I have a document that has a list of names. I need to create a new Word document for each of these names and save the file as that person's name, with only that person on it. So I need the macro to not only create and save the document with that person's name, I need it to delete every other name in the list...in short, 1 person on each document. Where would I begin here? Can this be accomplished in Word or am I going to need to figure out an Excel solution? (which would be pretty simple, but ultimately we'd like to have these documents in Word)
Reply With Quote
  #2  
Old 02-07-2013, 03:52 PM
macropod's Avatar
macropod macropod is offline Macro to create new word doc and save the file using String found in the document Windows 7 64bit Macro to create new word doc and save the file using String found in the document Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

If these documents are to have any content other than just the name, I'd suggest using your list as a mailmerge data source for a letter merge. That will produce a file with one page per entry, separated by Section breaks. You could then use a macro to split the output into separate files. For some examples of that, see: https://www.msofficeforums.com/mail-...ttachment.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 02-08-2013, 07:14 AM
VBNation VBNation is offline Macro to create new word doc and save the file using String found in the document Windows 7 32bit Macro to create new word doc and save the file using String found in the document Office 2010 32bit
Novice
Macro to create new word doc and save the file using String found in the document
 
Join Date: Feb 2013
Posts: 2
VBNation is on a distinguished road
Default

Thanks for the reply and the link. I will look into this this weekend. I anticipate I'll be back
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to create new word doc and save the file using String found in the document Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM
Macro to create new word doc and save the file using String found in the document A newbie question: a must to save macro word file as .docm? tinfanide Word VBA 6 12-06-2011 03:02 PM
Macro to create new word doc and save the file using String found in the document Macro VBA "Save as" with bookmarks in file name string Dom37 Word VBA 2 10-31-2011 03:28 AM
Macro to create new word doc and save the file using String found in the document Word Macro: Save file as text with current file name jabberwocky12 Word VBA 2 10-22-2010 12:23 PM
Macro will not save to normal.dot file when exiting bobbraun Word 1 09-28-2010 06:26 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:06 AM.


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