Word Document Properties


Chapter 11: VBA Programming with XML



Download 8,82 Mb.
Pdf ko'rish
bet199/207
Sana16.03.2022
Hajmi8,82 Mb.
#496217
1   ...   195   196   197   198   199   200   201   202   ...   207
Bog'liq
VBA For Dummies 5th Ed.pdf ( PDFDrive )

Chapter 11: VBA Programming with XML
17_046500 ch11.qxp 12/5/06 5:37 PM Page 241


If you have used the WordML output in the past, you’ll notice significant dif-
ferences in the WordML that Word 2007 outputs. For example, Word 2003
places the document information in the 
W:DOCINFO
element. The content
that used to appear in the 
W:BODY
element now appears in the 
pkg:name=”/word/document.xml”>
element. The change in format means
that any eXtensible Stylesheet Language Transformations (XSLT) processing
you performed with Word 2003 WordML won’t work with the Word 2007
version.
When you need the Word 2003 version, make sure that you select Word 2003
XML Document, as shown in Figure 11-3, rather than XML Document, as
shown in Figure 11-1. The output is closer than the Word 2007 version, but
you still face a few naming and namespace problems. For example, the
W:DOCINFO
element appears as 
o:DocumentProperties
, even though
the
W:BODY
element is the same.
The sample code for this chapter includes the original Word 2003 output as
WordML Example.xml
, the native Word 2007 output as 
WordML Example
2.xml
, and the converted Word 2007 output as 
WordML Example 3.xml
,
so you can compare the differences. (You can find the source code for
this example on the Dummies.com site at 
http://www.dummies.com/
go/vbafd5e
.)
The Word 2003 settings include a few special features you need to know
about. When you try to save a standard Word document as pure XML by
selecting the Save Data Only check box (lower-left area of Figure 11-3), Word
doesn’t generate WordML; instead, it generates standard XML. Unfortunately,
your Word template file probably doesn’t include the entries required to
create standard XML. As a result, the output is 0 bytes long. That’s right:
Nothing is saved because your document isn’t tagged for use with standard
XML. See the upcoming “Creating a Simple Word XML Document” section for
details on creating a template that saves your data to standard XML.
Figure 11-3:
Use the
special
Word 2003
setting for
saving XML
in a
compatible
state.
242

Download 8,82 Mb.

Do'stlaringiz bilan baham:
1   ...   195   196   197   198   199   200   201   202   ...   207




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish