word 文字型窗体域 4609:字符串太长

    科技2025-11-18  11

    在Microsoft Visual Basic中,输入如下函数:

    Sub Paper()       ' Set Text1 form field to a unique string.       Dim p1, p2, p3, p4, p5       p1 = "[1] Miao Y, Li J, Sun H. Multimodal Sparse Time–Frequency Representation for Underwater Acoustic Signals. IEEE Journal of Oceanic Engineering. 2020 Jun 23."       p2 = "[2]Miao Y, Sun H, Qi J. Synchro-compensating chirplet transform. IEEE Signal Processing Letters. 2018 Jul 20;25(9):1413-7."       p3 = "[3]Sun H, Miao Y, Qi J. Intrinsic Mode Chirp Multicomponent Decomposition with Kernel Sparse Learning for Overlapped Nonstationary Signals Involving Big Data. Complexity. 2018 Jan 1;2018."       p4 = "[4] Miao Y, Sun H, Wang J. Anisotropic Instantaneous Frequency Estimator. In2019 IEEE International Conference on Signal Processing, Communications and Computing (ICSPCC) 2019 Sep 20 (pp. 1-5). IEEE."       ThisDocument.FormFields("文字31").Result = "****"       If ThisDocument.ProtectionType <> wdNoProtection Then           ThisDocument.Unprotect       End If       Selection.GoTo what:=wdGoToBookmark, Name:="文字31"       Selection.Collapse       Selection.MoveRight wdCharacter, 1       Selection.TypeText (p1 & Chr(11) & p2 & Chr(11) & p3 & Chr(11) & p4)       Selection.GoTo what:=wdGoToBookmark, Name:="文字31"       ' Remove unique characters from Text1 form field.       With Selection.Find          .Execute findtext:="*", replacewith:="", Replace:=wdReplaceAll       End With       ThisDocument.Protect Password:="", NoReset:=True, Type:= _          wdAllowOnlyFormFields    End Sub

     

    Processed: 0.011, SQL: 8