Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 02-11-2014, 10:57 PM
macropod's Avatar
macropod macropod is offline don't know how to use ".wholestory" method Windows 7 32bit don't know how to use ".wholestory" method Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,520
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Jason,

That really is the wrong way to go about the process. As previously advised, you should modify the appropriate Style. Unnecessarily overriding paragraph Styles with different formats is ill-advised as it makes documents harder to maintain and can cause instability.

Since most documents use the 'Normal' Style as their default, the following demos how to reformat the document to use 11pt Arial with 0 before/after space and single line spacing as the paragraph format, without ever touching the document content:
Code:
Private Sub ScopeSendToWord()
Dim WdApp As Word.Application
Dim WdDoc As Word.Document
Set WdApp = New Word.Application
Set WdDoc = WdApp.Documents.Add
With WdDoc
  .Range.Text = txtScope
  With .Styles("Normal")
    With .ParagraphFormat
      .SpaceBefore = 0
      .SpaceAfter = 0
      .LineSpacingRule = wdLineSpaceSingle
    End With
    With .Font
      .Name = "Arial"
      .Size = 11
    End With
  End With
End With
WdApp.Visible = True
End Sub
PS: When posting code, please use the code tags. They're on the 'Go Advanced' tab.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: "Changes made were lost...reconnect with server", when switching "from" field randhurrle Outlook 2 02-25-2015 06:51 PM
When composing an e-mail how do I add "Page Layout" and "View" tabs to the ribbon CensorTilSin Outlook 1 12-11-2013 12:05 PM
help with compatibility of "WdSaveFormat" property of SaveAs method ajetrumpet Word 0 07-15-2013 07:29 AM
Method to active "Select Drawing Objects" rgustin Word VBA 1 08-18-2012 11:58 AM
don't know how to use ".wholestory" method How to choose a "List" for certain "Heading" from "Modify" tool? Jamal NUMAN Word 2 07-03-2011 03:11 AM

Other Forums: Access Forums

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