Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 08-14-2014, 12:50 AM
Tommes93 Tommes93 is offline formatting from word in xml Windows 7 64bit formatting from word in xml Office 2007
Novice
formatting from word in xml
 
Join Date: Mar 2014
Posts: 9
Tommes93 is on a distinguished road
Default

thank you for your code.
the code i posted is just a part of my whole code.
my code is as almost finished and works fine for the tables.
its just the problem with formatting.
your code works fine until this point:
Code:
  Do While .Find.Found
    .Text = "<strong>" & .Text & "</strong>"
    .Font.Bold = False
    .Collapse wdCollapseEnd
    .Find.Execute
  Loop
when the do while loop starts, it wont do it for only one cell or only the table. it goes through the whole document and changes every bold word. but it should do only one cell or a range i set.

at one point i set a range with this code
Code:
Do Until Selection.Style Like "Überschrift*" = True
                Selection.MoveDown Unit:=wdParagraph, count:=1
            Loop
            ende = Selection.End
            Set bereich = ActiveDocument.Range(anfang, ende)
or the code for the cells
Code:
For Each wdCell In ActiveDocument.Tables(ThisTableNumber + 1).Range.Cells

    Set Rng1 = wdCell.Range
    Rng1.End = Rng1.End - 1
    If Rng1.ListFormat.ListType = 3 Then
        If Steps = False Then
            TestcaseString = TestcaseString & "<steps>" & vbCrLf
            Steps = True
        End If
        
        Set Rng2 = wdCell.Next.Range
now the code you posted should change only this range.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatting contents after Tab of continuous lines or formatting specific area of word pawii Word 1 05-12-2014 05:24 AM
formatting from word in xml Formatting is restricted in Word 2007 but not in Word 2010 Word2007User Word 2 01-11-2014 06:33 PM
formatting from word in xml Word 2013 vs Word 2010 formatting issue? rhoyt Word 1 12-07-2013 09:40 AM
formatting from word in xml Formatting from PDF to WORD goldfish Word 8 04-25-2011 04:50 PM
Word Formatting Peter B. Word 5 05-10-2006 08:13 AM

Other Forums: Access Forums

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