Load function

M

MM

Hello everyone,

I am trying to run this function on word 2004 on Mac. It works
perfectly fine on pc but creates errors when running it on mac. Can
someone let me know how to fix this? thanks

Public Sub LoadXML(ByRef xmlObject As Object, ByVal xmlPath As String)
On Error GoTo Error_Handler
xmlObject.async = False
xmlObject.preserveWhiteSpace = True
xmlObject.Load (xmlPath)
xmlObject.Load (xmlPath)

Error_Handler:
If Err.Number <> 0 Then
Err.Raise Err.Number, Description:=Err.Description
End If
End Sub
 
C

CyberTaz

Well, I'm neither a VBA or XML coder but I would suspect that the reason for
the error is that Office 2004 doesn't know Jack about XML - there is no XML
support in that version of Mac Office. Keep in mind that you're dealing with
a version released more than 4 years ago.

Oddly enough, Office 2008 is purpodedly XML savvy, but lacks VBA, so your
code won't run there either:-(
 
J

John McGhie

I agree with Bob:

Word 2004 is using VBA version 5 (Same as Word 2000). None of the XML
objects are implemented. Word 2008 has no VBA at all.

Cheers


Well, I'm neither a VBA or XML coder but I would suspect that the reason for
the error is that Office 2004 doesn't know Jack about XML - there is no XML
support in that version of Mac Office. Keep in mind that you're dealing with
a version released more than 4 years ago.

Oddly enough, Office 2008 is purpodedly XML savvy, but lacks VBA, so your
code won't run there either:-(

--
Don't wait for your answer, click here: http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Consultant Technical Writer
McGhie Information Engineering Pty Ltd
http://jgmcghie.fastmail.com.au/
Sydney, Australia. S33°53'34.20 E151°14'54.50
+61 4 1209 1410, mailto:[email protected]
 
M

MM

I agree with Bob:

Word 2004 is using VBA version 5 (Same as Word 2000). None of the XML
objects are implemented. Word 2008 has no VBA at all.

Cheers




--
Don't wait for your answer, click here:http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Consultant Technical Writer
McGhie Information Engineering Pty Ltdhttp://jgmcghie.fastmail.com.au/
Sydney, Australia. S33°53'34.20 E151°14'54.50
+61 4 1209 1410, mailto:[email protected]

Thank you for replying to my posting. As John mentioned, none of the
xml objects were implemented with vb on word 2004 for mac. However, I
wonder whether with installing msxml2.DOMDocument myself the errors
caused by missing objects would be fixed! Can you please give me some
insight on this? thank you
 
J

John McGhie

No. To the best of my knowledge, the DOM is hard-wired in Word 2008.


Thank you for replying to my posting. As John mentioned, none of the
xml objects were implemented with vb on word 2004 for mac. However, I
wonder whether with installing msxml2.DOMDocument myself the errors
caused by missing objects would be fixed! Can you please give me some
insight on this? thank you

--
Don't wait for your answer, click here: http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Microsoft MVP, Word and Word:Mac
Sydney, Australia. mailto:[email protected]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top