Makro : vložení aktuálního datumu a času

Makro : vložení aktuálního datumu a času

Před časem jsem našel na webu šikovné makro "vložit akt.datum" do vybrané buňky.Při každodením vyplňování tabulek se určitě hodí.Já ho využívám velice často a myslím,že i vám pomůže usnadnit práci.

Makro obsahuje část pro calc,ale i pro writer.

REM Makro pre vloženie aktuálneho dátumu na bunku (Calc) alebo pozíciu (Writer), kde sa nachádzame
sub Vloz_Datum
 dim dokument, bunka as object
 dim teraz, datum, cas as string
 dim i as integer
 
 teraz=now ' Aktuálny dátum a čas ako reťazec vo formáte "dd.mm.rrrr hh:mm:ss"
 i=instr(teraz," ") ' Pozícia, kde je oddelený dátum a čas
 
 datum=left(teraz,i-1) ' Dátum
 
 REM Časť pre CALC
 if ThisComponent.supportsService("com.sun.star.sheet.SpreadsheetDocument") then
  ' Funkcia vloží dátum do aktuálnej bunky zošitu v Calcu
  ' V Calcu je bunka, na ktorej sa nachádzame vybraná automaticky
  dokument=ThisComponent.getCurrentSelection() ' Aktuálny výber
  bunka=dokument.getCellByPosition(0,0) ' Aktuálna bunka
  bunka.value=datevalue(datum) ' Vloženie dátumu ako hodnoty
 endif
 
 REM Časť pre WRITER
 if ThisComponent.supportsService("com.sun.star.text.TextDocument") then
  ' Funkcia vloží dátum na aktuálnu pozíciu vo Writeri
  dokument=ThisComponent.currentcontroller.getViewCursor() ' Viditeľný kurzor
  dokument.collapseToEnd() ' Zrušíme prípadný výber (označený text)
  teraz=dokument.getstring() ' Odpamätáme si aktuálny reťazec kde sa nachádzame s kurzorom
  dokument.setstring(teraz+datum) ' a vložíme odpamätaný aktuálny reťazec + dátum
  dokument.collapseToEnd() ' Skočíme na koniec vloženého dátumu
 endif
 
end sub

Zdroj:dennik.inet.sk

Diskusní téma: Makro : vložení aktuálního datumu a času

Visit Verona on Segway 2019

Angelpes | 16.11.2018

Segway Verona Tour propone un modo originale per visitare la storica citta sull'Adige.
Il Segway e un veicolo elettrico, auto-bilanciante di facile utilizzo, ideale per famiglie,
coppie, individui che vogliono visitare la citta da una nuova prospettiva,
senza fatica e con l'accompagnamento di guide esperte.

Il tour ha una durata di 2 ore e percorre il seguente itinerario:

Portoni della Bra
Verona Arena
Castelvecchio
Arco dei Gavi
Porta Borsari
Corso Porta Borsari
Piazza delle Erbe
Palazzo della Ragione
Piazza dei Signori
Arche Scaligere
Chiesa Santa Anastasia
Cattedrale Santa Maria Matricolare
Ponte Pietra
Casa di Giulietta


marketing,health,men,women,cars

Jamesstait | 22.10.2018

I think this is among the most important information for me. And i'm glad reading your article.

How To Prevent Prostate Problems And Diseases?

Albertisono | 05.06.2018

The prostate gland is central to the part of a male's reproductive :. It secretes fluids that aid in the transportation and activation of sperm. The men's prostate is located just in front of the rectum, below the bladder and all around the urethra. When there is prostate problem, it is usually really miserable and inconvenient for that patient as his urinary strategy is directly affected.

The common prostate health problems are prostate infection, enlarged prostate and prostate cancer.



Prostate infection, also referred to as prostatitis, is easily the most common prostate-related overuse injury in men younger than 55 years. Infections in the prostate related are classified into four types - acute bacterial prostatitis, chronic bacterial prostatitis, chronic abacterial prostatitis and prosttodynia.

Acute bacterial prostatitis may be the least common of most kinds of prostate infection. It is brought on by bacteria perfectly located at the large intestines or urinary tract. Patients may feel fever, chills, body aches, back pains and urination problems. This condition is treated by making use of antibiotics or non-steroid anti-inflammatory drugs (NSAIDs) to alleviate the swelling.

Chronic bacterial prostatitis is really a condition of a particular defect inside the gland along with the persistence presence of bacteria inside urinary tract. It can be caused by trauma towards the urinary tract or by infections received from other areas from the body. A patient may experience testicular pain, small of the back pains and urination problems. Although it is uncommon, it could be treated by removal in the prostate defect as well as the utilization antibiotics and NSAIDs to take care of the soreness.

Non-bacterial prostatitis accounts for approximately 90% of prostatitis cases; however, researchers have not even to establish the causes of these conditions. Some researchers feel that chronic non-bacterial prostatitis occur due to unknown infectious agents while other feel that intensive exercise and heavy lifting can cause these infections.

Maintaining a Healthy Prostate

To prevent prostate diseases, a suitable weight loss program is important. These are some from the actions to keep your prostate healthy.

1. Drink sufficient water. Proper hydration is critical for health and wellness and this will also keep your urinary track clean.

2. Some studies suggest that a couple of ejaculations per week will assist to prevent prostate type of cancer.

3. Eat beef in moderation. It has been shown that consuming more than four meals of beef a week will raise the probability of prostate diseases and cancer.

4. Maintain an effective diet with cereals, vegetable and fruits to make sure sufficient intake of nutrients necessary for prostate health.

The most important measure to adopt to ensure a wholesome prostate is always to select regular prostate health screening. If you are forty years old and above, you must go for prostate examination at least one time per year.

Zdroj

j.p. | 24.03.2011

Uvádzajte aspoň zdroj, odkiaľ ste makro skopírovali: https://dennik.inet.sk/clanok/8925-makra-v-openoffice-org-jazykovo-lokalizovane-vkladanie-datumu-a-casu/

<< 146 | 147 | 148 | 149 | 150

Přidat nový příspěvek


Tvorba www stránek zdarma Webnode