Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 04-14-2018, 08:14 PM
BobBridges's Avatar
BobBridges BobBridges is offline Copy & Paste Word Doc from Excel VBA Windows 7 64bit Copy & Paste Word Doc from Excel VBA Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

I don't know from Mail Merge—I've done it a few times, but not often enough to remember how—but it seems all you want, at least for now, is to copy a document with a known path and name to a new document with the current path and a calculated name. Nothing hard or complex about that, right? What am I missing?

First you calculate the new Word document name, probably using this formula:
Code:
=$C$2&" "&$C$4&" "&$C$3&" "&$C$6&" "&TEXT($C$7,"m-d-yyyy")&"-"&TEXT($C$8,"m-d-yyyy")&".docx"
Then you have code that fetches a copy of the template (so to speak) from the old location, and copy it to C:\<current path>\<calculated filename>.

Either I've misunderstood you, or there's some part of that you don't know how to do. If the latter, which part? I don't want to insult you by telling you all the things you already know and leaving out the one part that's confusing you.

For the copying part, you could open up the Word application, then do an Open and a Save-As. But I'm sure it'll be simpler to access some Windows feature that does file copies. Is that the part you're having trouble with? Because if it is, I'd have to google it myself. Won't be hard, though.
 

Tags
excel 2010, excel vba, word 2010



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy &amp; Paste Word Doc from Excel VBA Copy/paste from Excel to Word problems! mross127 Word 10 08-16-2017 04:41 PM
Copy Underline text from Word and Paste into excel rfaris Excel Programming 7 10-05-2015 05:56 AM
Copy &amp; Paste Word Doc from Excel VBA Copy/Paste EXCEL cells as pic in WORD A_Lau Drawing and Graphics 3 12-19-2014 06:57 AM
Copy &amp; Paste Word Doc from Excel VBA Word 2007 Copy/Paste Excel issue raven26c Word 1 11-18-2011 02:49 AM
copy/paste charts from excel to word bielak01 Excel 0 04-16-2009 02:27 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:40 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