Can I set 2 Conditions for If fields in Word?

Diskutiere und helfe bei Can I set 2 Conditions for If fields in Word? im Bereich Microsoft Office im Windows Info bei einer Lösung; Hi,I want to set up a nested IF field in word that checks 2 conditions both dropdown menues and displays the appropriate text block. I made extensice... Dieses Thema im Forum "Microsoft Office" wurde erstellt von mbncsa, 14. Juni 2024.

  1. mbncsa
    mbncsa Gast

    Can I set 2 Conditions for If fields in Word?


    Hi,I want to set up a nested IF field in word that checks 2 conditions both dropdown menues and displays the appropriate text block. I made extensice use of simple nested IF-fields before but cant find documentation on the syntax of IF-fields with two conditions.It should work like this:Condition 1 = a & Condition 2 = z -> Textblock azCondition 1 = b & Condition 2 = z -> Textblock bzCondition 1 = a & Condition 2 = y -> Textblock ayCondition 1 = b & Condition 2 = y -> Textblock byetc.Can anyone spell out the syntax for me since there seems to be no AND-operator?T
     
  2. Mucahid Toprak Win User

    Kommunikation zwischen Client und dem Microsoft Store

    Hi,
    i can also write in english if its better for you.
    Im using Word'21.
  3. Robin Huber Win User

    Unlink Fields in Excel and PowerPoint

    Hello

    Thanks for the answers. But that's not what I'm looking for.

    I search for a solution to "unlink" the fields in header and footer. For example a date field, which updates when I print or open the file.

    In word I can do this with a macro, but in excel and powerpoint that solution didn't worked.
  4. Robin Huber Win User

    WORD MACRO: Search for date fields and replace result

    Hi Robin,

    The simplest way is to toggle the display of field codes and then search for ^d DATE. If you are on a Windows computer you would toggle the display of the field code using the keyboard shortcut Alt+F9 (or, on some computers Fn+Alt+F9). Are you planning on doing
    this with a macro? Your title would appear to request this.

    Are your fields DATE fields or CREATEDATE or SAVEDATE or PRINTDATE? See my page on the different date fields in Word.

    http://addbalance.com/word/datefields1.htm

    What is it you want to replace them with?

    This forum is a user-to-user support forum. I am a fellow user.

    I hope this information helps.

    Please let me know if you have any more questions or require further help.

    You can ask for more help by replying to this post (Reply button below).

    Stay well
    Hi Charles

    Thank you for your answer!

    Yes I want to do this with a macro. I want to replace all datefields with (for example) "hello". I have a macro that replaces all fields with "hello". But I want that only date fields get replaced.

    Can you help me with this?
  5. Alf der Ausserirdisc Win User

    Falscher Inhaltsverzeichniseintrag durch Feldfunktion

    Vielen Dank für eure Vorschläge!

    Mittlerweile habe ich eine andere Lösung, die auch im Hinblick auf die Pflege der Textbausteine besser ist.

    Ich sammle die Textbausteine ohne Nummerierung in einem separaten Dokument (Textbausteine.docx) und versehe sie mit Textmarken ("TBTextmarke").

    Diese füge ich mit { IF { DOCPROPERTY "Abteilung" } = "A1" { INCLUDETEXT Pfad zu Textbausteine.docx
    TBTextmarke } "Alternativtext" } in das Ziel-Dokument ein.

    Da nun die Nummerierung über alle Überschriften/Listeneinträge nicht stimmt, korrigiere ich sie mit Hilfe eines Makros:

    Sub Nummerieren()

    Dim oToc As TableOfContents

    Dim oDoc As Document

    Dim oPar As Paragraph

    Dim lfTemp As ListFormat

    Dim ltTemp As ListTemplate

    Dim flTemp As Field



    Set oDoc = ActiveDocument

    Set oToc = oDoc.TablesOfContents(1)



    ' Feld-Ergebnisse in normalen Text umwandeln <-- wichtig, damit die ListTemplate-Zuweisung ausschließlich

    ' den Überschrift-Absatz betrifft!

    For Each flTemp In oDoc.Fields

    If flTemp.Type <> wdFieldTOC And flTemp.Type <> wdFieldTOCEntry Then

    flTemp.Unlink

    End If

    Next flTemp



    ' Nicht nummerierte Überschriften suchen und nummerieren

    For Each oPar In oDoc.Paragraphs

    If oPar.OutlineLevel <> wdOutlineLevelBodyText Then

    Set lfTemp = oPar.Range.ListFormat

    If lfTemp.ListTemplate Is Nothing Then

    'Selection.StartOf Unit:=wdParagraph, Extend:=wdMove

    lfTemp.ApplyListTemplateWithLevel ListTemplate:=ltTemp, ContinuePreviousList:=True, ApplyTo:=wdListApplyToSelection, DefaultListBehavior:=wdWord10ListBehavior

    ElseIf ltTemp Is Nothing Then

    Set ltTemp = lfTemp.ListTemplate

    End If

    End If

    Next oPar



    'Update TOC

    oToc.Update



    Set oDoc = Nothing

    Set oToc = Nothing

    End Sub

    Das Objektmodell von Word ist schon echt schräg! Entsprechend schräg verhält sich Word auch manchmal ;-)

    Schönen Gruß,

    Alvar
  6. Torsten Schwanitz Win User

    Word 365: Einfügen eines Schnellbausteins in ein Textfeld

    Good afternoon,

    here is the english version:

    I would like to insert a BuiltInDocumentPropertie (to be precise the field itself) into a text box. The text box should contain the content of the quick function block "Status" (internally referred to as "Content status").

    The following code only inserts the name of the field, but not the field itself.

    Dim proDoc As DocumentProperty

    Add a text box

    Set shpCanvas = ActiveDocument.Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal, Left:=1, Top:=1, Width:=100, Height:=100)

    For Each proDoc In ActiveDocument.BuiltInDocumentProperties

    If proDoc.Name = "Content status" Then

    Set proDoc = ActiveDocument.BuiltInDocumentProperties("Content status")

    shpCanvas.TextFrame.TextRange = ActiveDocument.BuiltInDocumentProperties("Content status")

    End If

    Next

    Thank you for your help in advance!
  7. User Advert


    Hi,

    willkommen im Windows Forum!
Thema:

Can I set 2 Conditions for If fields in Word? - Microsoft Office

Die Seite wird geladen...

Can I set 2 Conditions for If fields in Word? - Similar Threads - Can set Conditions

Forum Datum

I can

I can: Seit Freitag kann ich keine Mails mehr empfangen oder senden. Meine Kenntnisse sind gering und habe beim Versuch das Problem zu lösen, noch mehr Probleme geschaffen. Zum klassischen Outlook kann...
Outlook.com 23. Juni 2025

I Can

I Can: I cant open my E-Mail Account
Outlook.com 7. Juni 2025

I can

I can: Ich kann keine emails empfangen und versenden
Outlook.com 10. April 2024

I can

I can: Ich kann keine email mehr bekommen Hilfe
Outlook.com 19. November 2023

How can I set ALL Word docs to open in an editable mode?

How can I set ALL Word docs to open in an editable mode?: How can I permanently set Word so that all docs open in an editable mode, please?Like the good old days!
Microsoft Office 21. März 2023

IF Bedingung in Word

IF Bedingung in Word: Hallo zusammen, ich habe bisher nur mit Excel-Formeln gearbeitet. Word formeln sind neu für mich. ich glaube ein besonders triviales problem: ich möchte in einen Fließtext eine IF-Bedingung...
Microsoft Office 26. November 2020

WORD MACRO: Search for date fields and replace result

WORD MACRO: Search for date fields and replace result: Hi I'm working on a solution to search date fields in Word and replace the result. Replacing the result should be easy but how can I search for date fields?
Microsoft Office 9. September 2020
Can I set 2 Conditions for If fields in Word? solved
  1. Diese Seite verwendet Cookies, um Inhalte zu personalisieren, diese deiner Erfahrung anzupassen und dich nach der Registrierung angemeldet zu halten.
    Auf dieser Website werden Cookies für die Zugriffsanalyse und Anzeigenmessung verwendet.
    Wenn du dich weiterhin auf dieser Seite aufhältst, akzeptierst du unseren Einsatz von Cookies.