Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-28-2017, 01:33 AM
AHKpie AHKpie is offline vba newb problem Windows 7 64bit vba newb problem Office 2010 64bit
Novice
vba newb problem
 
Join Date: Jun 2017
Posts: 7
AHKpie is on a distinguished road
Default vba newb problem

Hello dear VBA programmers,

If I execute the next Macro1 in the document I am working in, I get the index I want printed in the same document.
What codes do I have to add if I want to select and copy only the index?
(The printed index is good but I want paste the result in a new empty document)
Many thanks in advance.

Sub Macro1()
ActiveDocument.TablesOfContents.Add Range:=Selection.Range, _
RightAlignPageNumbers:=True, _
UseHeadingStyles:=True, _
UpperHeadingLevel:=1, _
LowerHeadingLevel:=5, _
IncludePageNumbers:=True, _
AddedStyles:="", _
UseHyperlinks:=True, _
HidePageNumbersInWeb:=True, _


UseOutlineLevels:=True
End Sub
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
vba newb problem Newb needing VBA solution to change formatting derekcentrico Word VBA 10 12-12-2016 12:27 PM
vba newb problem newb - search and replace - WILDCARDS - keep original...? Bansaw Word 4 09-01-2016 11:16 AM
Backing up importing & exporting ?? I am a newb Jazz OneNote 0 01-27-2016 10:18 PM
vba newb problem newb - need help automating catalogue production Deeper Office 2 09-09-2015 01:45 AM
NEWB to Macros - formatting exports EC37 Excel Programming 52 06-25-2014 06:26 AM

Other Forums: Access Forums

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