none
Using IF THEN STATEMENTS in Word Developer RRS feed

  • Question

  • How do I create an IF/THEN statement in word developer
    • Moved by JOshiro Thursday, November 22, 2012 1:05 AM Word Developers question (From:Live Connect)
    • Changed type Cindy Meister MVPModerator Thursday, November 22, 2012 10:04 AM it's a question
    Wednesday, November 21, 2012 8:22 PM

Answers

  • Hi,

    Thank you for posting in the MSDN Forum.

    If you mean the syntax, the below might help you.

    Syntax

    If condition Then [statements] [Else elsestatements]

    Or, you can use the block form syntax:

    If condition Then
    [statements]

    [ElseIf condition-n Then
    [elseifstatements]

    [Else
    [elsestatements]]

    End If

    For more detailed information, you can refer to this page. You'll find many other information about VBA there.

    Hope it helps.

    Best regards,


    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us

    Friday, November 23, 2012 3:06 AM
    Moderator

All replies

  • Is this for a macro, or for field coding?

    Cheers
    Paul Edstein
    [MS MVP - Word]

    Thursday, November 22, 2012 7:57 AM
  • Hi,

    Thank you for posting in the MSDN Forum.

    If you mean the syntax, the below might help you.

    Syntax

    If condition Then [statements] [Else elsestatements]

    Or, you can use the block form syntax:

    If condition Then
    [statements]

    [ElseIf condition-n Then
    [elseifstatements]

    [Else
    [elsestatements]]

    End If

    For more detailed information, you can refer to this page. You'll find many other information about VBA there.

    Hope it helps.

    Best regards,


    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us

    Friday, November 23, 2012 3:06 AM
    Moderator