Pages

Search

Microsoft Word - Find and replace only selection in VBA

Microsoft Word - Find and replace only selection in VBA


Find and replace only selection in VBA

Posted: 17 Dec 2012 10:29 AM PST

I have a Word 2010 document in which I want to find and replace paragraph characters with a space. The code works except I want it to only replace in the selected text. When I run it it replaces all the paragraph marks on the page, including text that I have not highlighted. What needs to be changed in my code?  Thank you for your help.

    ' ReplaceParaMarks
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "^p"
        .Replacement.Text = " "
        .Forward = True
        .Wrap = wdFindAsk
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll

Styles - Is there a printed list available for the approximate 125 built-in styles (see types of styles below) with examples for their best use?

Posted: 17 Dec 2012 06:01 AM PST

Styles - Is there a printed list available for the approximate 125 built-in styles (see types of styles below) with examples for their best use?

Word 2010 Primary Types of Styles

Paragraph

Character

Linked

List

Table

I want to be able to use these styles as effectively as possible.

Your help is appreciated.

 

I cannot get Word 2007 to number pages in my document header with content consecutively. It will only give them all the same number

Posted: 16 Dec 2012 11:40 PM PST

The first page of my resume has my contact info.  The second page is suposed to have my name on the left and "Page 2" on the right, and then next, My name on the left and "Page 3" on the right.  It will either give me two Page 2's or two Page 3's

Formatting Text to Not Print

Posted: 16 Dec 2012 04:03 PM PST

I am working on a school project in Word 2010. Is there a way to set text to invisible so that it is still on the document, but it will not print?

I realize that may sound confusing, so I will give you an idea of what I'm trying to accomplish- I need to print a sample document with notes and comments about margin settings, tab settings, number of hard returns, etc, but I don't want the notes/comments on the actual document. I would like to print them on a transparent sheet (so that when placed over the actual document, you can see the notes/comments). But for this to be effective, I need everything to line up perfectly...and I figure the simplest way to do so would be to just select the document text that I don't want to print and "hide" it somehow. Is there any way to do this?

Shortcut to Recheck Spelling and Grammar in Document

Posted: 16 Dec 2012 12:39 PM PST

I know Recheck Document is buried in File>Options>Proofing and it takes 6 clicks to Recheck a document for spelling and grammar.

 

I know I can go through the Review Ribbon>Spelling and Grammar, but that is 6 clicks as well.

 

I could not find anything under All Commands in either Ribbon or QAT. That doesn't it it isn't there!

 

I did find under Keyboard ToolsSpellingRecheckDocument and I asigned an unasigned key sequence to it, but it rechecked only spelling, not grammar.

 

In editing I use this frequently and would like to find a quicker way than 6 clicks.

 

I successfully recorded a macro assigned to a QAT button, so I have that function now, however, is there a better way?

 

Thanks in advance,

Bob

 

 

Pop up

Posted: 15 Dec 2012 08:22 AM PST

Everytime I open a Word or Excel file to edit, I get a pop up that says:

"Sorry, but to open this document, your computer must be running a supported version of Microsoft Word.

If you have an older version of Office or no Office at all,  you can try Microsoft Office 2013 for free."

 

then below it has two boxes to click on "Try Office 2013" and " I have Office"

Funny thing is though this was popping up even when I was trying Office 2013, which I have since uninstalled.

 

Thanks

John

VBA Code for Centering a Line

Posted: 14 Dec 2012 02:31 PM PST

I am creating a large variable string representing several paragraphs.  The paragraphs are divided by Chr(13) & Chr(10) and start with a tab character (vbTab).

Is there a similar code or character that I could use to indicate that a paragraph is to be centered or left-justified?

Columns and Lines Between Them in Word 2013

Posted: 12 Dec 2012 04:18 PM PST

I'm trying to create a document with two columns using the Left Column option in Word 2013. 

 

I click Columns on the Page Layout ribbon and then select Left. 

 

The next step is click Columns and then More Columns.  In that window I mark the checkbox for Line Between.

 

The columns are created but I'm not seeing a line. 

 

Why would the line not appear? 

 

Also, I'd like to type primarily in column 2 with column 1 used for graphics and text that refers to information in column 2.  How can I select column 2 for typing rather than being forced to start in 1 and let the text flow into 2?

 

Thank you

 

 

Can't find Office programs in Windows 8

Posted: 11 Dec 2012 09:10 PM PST

I downloaded windows 8 today and can not find my old programs. Such as word, excel, etc

How can I center page numbers in the footer and align the date on the right?

Posted: 11 Dec 2012 06:14 PM PST

Original Title: "Footers"

 

I want page number centered in footer (numeral only) and want date and time right set on same line..  I've read your article re headers and footers.