🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.vbasic
Article #92318

Re: Tabela w wordzie.

#92318
From: pxd74
Date: Fri, 21 Oct 2005 17:47
27 lines
1651 bytes
Użytkownik "Bartosz Różański" <barozi@poczta.onet.pl> napisał w wiadomości
news:djb6gf$5ok$1@news.onet.pl...

> Kod ten wstawia nowy autotekst w złym miejscu a dokładnie to dołącza ją do
> tabeli numer 2 w dokumencie, pozostawiając tabelę numer 3 wyczyszczoną z
> tekstu, ale widoczną.

Jeśli Ciebie dobrze zrozumiałem, to użyj tego:

Sub podmien(nazwaAutotekstu As String)
Dim zakres As Range
Dim wordDok As Document
Dim szablon As Template
Dim start As Long

    Set wordDok = ActiveDocument
    Set szablon = wordDok.AttachedTemplate
    start = wordDok.Tables(3).Range.start
    wordDok.Tables(3).Delete
    Set zakres = wordDok.Range(start, start)
    Set zakres = szablon.AutoTextEntries(nazwaAutotekstu).Insert(zakres,
True)
End Sub

-- 
Pozdrowienia
pxd74
Technical Details
Message-ID: <djb9em$tg$1@inews.gazeta.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
References: <djb6gf$5ok$1@news.onet.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: "pxd74" <pxd74@poczta.onet.pl>
Newsgroups: pl.comp.lang.vbasic
Subject: Re: Tabela w wordzie.
Date: Fri, 21 Oct 2005 19:47:37 +0200
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 28
Message-ID: <djb9em$tg$1@inews.gazeta.pl>
References: <djb6gf$5ok$1@news.onet.pl>
NNTP-Posting-Host: 146.85-237-177.tkchopin.pl
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1129916695 944 85.237.177.146 (21 Oct 2005 17:44:55 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Fri, 21 Oct 2005 17:44:55 +0000 (UTC)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-User: pxd74
X-MSMail-Priority: Normal
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit