Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-12-2015, 01:17 AM
1van 1van is offline Apply styles in word table Windows 7 64bit Apply styles in word table Office 2007
Novice
Apply styles in word table
 
Join Date: Nov 2015
Posts: 4
1van is on a distinguished road
Default Apply styles in word table

Hello, I need help with making a macro for repeatedly adding specific styles to parts of the table, to loop trough the document until the text "%string" is found.



So I would need to apply a style, move a few 'tabs', add a new style, move 'tabs', until "%string" is found:

Code:
    Selection.Style = ActiveDocument.Styles("style1")
    Selection.MoveRight Unit:=wdCell
    Selection.MoveRight Unit:=wdCell
    Selection.MoveRight Unit:=wdCell
    Selection.MoveRight Unit:=wdCell
    Selection.MoveRight Unit:=wdCell
    Selection.MoveRight Unit:=wdCell
    Selection.Style = ActiveDocument.Styles("style1")
    Selection.MoveRight Unit:=wdCell
    Selection.MoveRight Unit:=wdCell
    Selection.MoveRight Unit:=wdCell
    Selection.MoveRight Unit:=wdCell
    Selection.MoveRight Unit:=wdCell
    Selection.MoveRight Unit:=wdCell
this is the number of 'tabs' that is required to position over the right part of the table.

Thank you. Ivan.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Word Table - Select More than 1 Column at a time - Apply Formatting jc491 Word VBA 12 09-24-2015 06:03 AM
Apply styles in word table Word 2013: My custom table styles disappeared from Gallery sinz54 Word Tables 1 03-13-2015 05:02 PM
Apply styles in word table how to apply table style WITHOUT setting it as a table? dylansmith Excel 9 05-16-2014 07:25 PM
Apply styles in word table How 2 Save Table Properties & Apply to other table Popeye.Tom Word Tables 1 04-24-2013 09:44 PM
Paragraph space before - can styles apply it intelligently? timpani Word 7 10-23-2012 04:08 PM

Other Forums: Access Forums

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