Results 1 to 4 of 4

Thread: Has anyone got Kowledge of Word VBA

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2004
    Posts
    62

    Has anyone got Kowledge of Word VBA

    Sorry about this not being the correct forum but can anyone lead me to a VBA foum simular to this one

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Has anyone got Kowledge of Word VBA

    Moved

    did you have a particular question?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2004
    Posts
    62

    Re: Has anyone got Kowledge of Word VBA

    Yes Rob I do have a question if you could possibly help. Having legitimately copied and downloaded large bodies of text and opened with Word 2003 many addition line end have been returned (paragraph marks are in place). I have been trying to create a macro to find these paragraph marks delete them and add a space.

    The problem is I can’t find any reference to paragraph marks to allow me to search for them.

  4. #4
    Fanatic Member Dnereb's Avatar
    Join Date
    Aug 2005
    Location
    Netherlands
    Posts
    863

    Re: Has anyone got Kowledge of Word VBA

    In Word A paragraph is Ended by vbreturn (Yes every time you use enter in word you make a new paragraph)
    and the new one start with the first character after de carriage return.

    to access all paragraphs as one text you can use .content

    if you would do something like this (written on the fly)

    Code:
    Dim MainStory As Range
    Set MainStory = ActiveDocument.Content
    
    With MainStory.Find
        .Text = Chr$(14)
        .ClearFormatting
        .Replacement.Text = Chr$(20)
        .Replacement.ClearFormatting
        .Execute Replace:=wdReplaceOne, Forward:=True
    End With
    all paragraphs would be fuse to one
    why can't programmers keep and 31 Oct and 25 dec apart. Why Rating is Useful
    for every question you ask provide an answer on another thread.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width