Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-19-2016, 12:13 AM
UnlimitedPower UnlimitedPower is offline Filename Windows 7 64bit Filename Office 2010 64bit
Novice
Filename
 
Join Date: Aug 2016
Posts: 1
UnlimitedPower is on a distinguished road
Default Filename

Hello,



I'm creating a word document that imports text from a other document trough "Mailings". This generates 1 file with all the data.
I use the following code to save each page to 1 file.

Code:
Sub BreakOnPage()
   Application.Browser.Target = wdBrowsePage
   For i = 1 To ActiveDocument.BuiltInDocumentProperties("Number of Pages")
 
     ActiveDocument.Bookmarks("\page").Range.Copy
      Documents.Add
      Selection.Paste
      Selection.TypeBackspace
      ChangeFileOpenDirectory "Z:\"
      DocNum = DocNum + 1
      ActiveDocument.SaveAs FileName:="Verslag_" & DocNum & ".doc"
      ActiveDocument.Close
      Application.Browser.Next
   Next i
   ActiveDocument.Close savechanges:=wdDoNotSaveChanges
End Sub
I'm a total noob at this but I would like to copy a word from the generated file and paste it in the title. Is this possible?

Kind Regards,
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Put data from one file to another with certain filename dapeamel Excel Programming 6 03-16-2015 09:31 AM
Filename Part of Filename in header mthicke Word 5 02-25-2014 03:54 PM
Error! Filename not Specified mark.lacey Outlook 0 10-12-2011 03:02 AM
Filename From Office '03 to '10 - where is the Excel filename ??? TL86 Excel 4 02-21-2011 08:08 AM
Filename in footer Dixon Word 3 09-24-2009 09:12 AM

Other Forums: Access Forums

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