Pehea e hoʻohui ai i TextForms e hana i ka laʻana me ka ONLYOFFICE macro

Ke hoʻohana nei kēia ʻāpana TextForms e hana i  i ka.

loop loop e hoʻololi i kēlā me kēia mea .

Ma kēia ala mākou e hōʻoia ai e hoʻokomo ʻia ka.

TextForm o ka huaʻōlelo i ʻōlelo ʻia i loko o kēlā me kēia mea (palakala).

Ma ka loop loop, loaʻa iā mākou kēlā me kēia mea palapala e.

hoʻohana ana i ke ala GetElement () me elementIndex .

Wehe mākou i ka kikokikona maʻamau a mālama iā ia i loko o ka loli rawText .

I ka hana ʻana me nā faila template form

hoʻohana pinepine mākou TextForms e hana i i nā mea pa.

ʻa dummy a hoʻololi iā lākou me nā mea hoʻohālike.

Ma kēia ʻatikala, e hoʻohana mākou i kahi macro.

hoʻoponopono palapala e hoʻokaʻawale i kēia kaʻina hana, e hoʻokomo i kahi.

TextForm ma kēlā me kēia manawa o kahi huaʻōlelo i kuhikuhi ʻia.

Ma ʻaneʻi, mālama ʻia ka TextForms ke alakaʻi kūikawā e hana i palapala.

o kēia manawa ma ka ʻano oDocument . A laila kiʻi mākou i ka huina o nā mea i loko o ka palapala me ka hoʻohana ʻana i ke ala GetElementsCount() .

ke alakaʻi kūikawā

Maanei mākou e wehewehe ai i nā huaʻōlelo

o ka loiloi. Ma hope o kēlā, hoʻohana mākou i ka loop loop e hoʻoholo ai i ka lōʻihi o ka huaʻōlelo a mālama iā ia i loko o ka huaʻōlelo loliLength .

Ma ʻaneʻi, ma ka loop TextForms e hana i loop , hoʻololi mākou i nā manawa āpau i loaʻa a mālama ʻia i wordRegex .

No kēlā me kēia pāʻani, helu ʻia ke kūlana hoʻomaka o ka huaʻōlelo (matchPosition ) a me ke kūlana o ka ʻano aʻe ma hope o ka huaʻōlelo ( nextMatchPosition) .

Ma hope o kēlā, mālama mākou i ka laulā

a mākou e makemake ai e hana ma ʻIke laina insertRange . A laila koho mākou i ka laulā me ka hoʻohana ʻana i ke ala koho () .

A laila, e hana i kahi papa kuhikuhi adb TextForms e hana i ʻōlelo maʻamau ( wordRegex ) me ka hoʻohana ʻana i ka huaʻōlelo i manaʻo ʻia e ʻimi i nā pāʻani āpau i ka palapala.

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top