473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

A macro from words in VB doesn't works in Explorer local

3
Hello,
I've made a macro (see in jos_xmlHTM.htm) in Words to change a XML file (josxml.xml) and save it as a new file (josxml2.xml).
In words everything will be ok, it works.

When i make a htm file of it and put the macro in there (see in jos_xmlHTM.htm) it doesn't work.

The files jos_xmlHTM.htm and the josxml.xml you can find on:
http://www.jmoeskops.nl/josxml.xml
http://www.jmoeskops.nl/jos_xmlHTM.htm
or in the attachment.

you can email to info@jmoeskops.nl

I hope i posted this in the write forum.

Can somebody help me?
Thanks for your help.
Attached Files
File Type: zip VBproblem.zip (1.5 KB, 53 views)
Feb 22 '08 #1
3 1076
VBWheaties
145 100+
Hello,
I've made a macro (see in jos_xmlHTM.htm) in Words to change a XML file (josxml.xml) and save it as a new file (josxml2.xml).
In words everything will be ok, it works.

When i make a htm file of it and put the macro in there (see in jos_xmlHTM.htm) it doesn't work.

The files jos_xmlHTM.htm and the josxml.xml you can find on:
http://www.jmoeskops.nl/josxml.xml
http://www.jmoeskops.nl/jos_xmlHTM.htm
or in the attachment.

you can email to info@jmoeskops.nl

I hope i posted this in the write forum.

Can somebody help me?
Thanks for your help.
You are trying to work with Words Document object without a CreateObject/GetObject call.
Feb 22 '08 #2
JosM
3
You are trying to work with Words Document object without a CreateObject/GetObject call.
Hello, thanks for your replay.

Do you know how it must look like? I'm completly new in VBscripts.

Regards Jos
Feb 23 '08 #3
VBWheaties
145 100+
Hello, thanks for your replay.

Do you know how it must look like? I'm completly new in VBscripts.

Regards Jos
Create an instance of Word application:
Expand|Select|Wrap|Line Numbers
  1. Dim wrdApp
  2. Set wrdApp = CreateObject("Word.Application") 
  3.  
Create the instance for your document:
Expand|Select|Wrap|Line Numbers
  1. Dim wrdDoc
  2. Set wrdDoc = wrdApp.Documents(1)
  3.  
Then, you can take it from there.

For additional information and more complete examples:
http://www.activexperts.com/activmon...msoffice/word/
Feb 25 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Karim Thapa | last post by:
Why following macro does not work? #define removebrace(x) x void Foo(int a, int b, char *txt, int d, int e); main() {
14
by: Malcolm | last post by:
Hi, I have the following which fails with "disagreement in number of macro arguments" when compiling with Imagecraft ICCAVR. Has anyone got any ideas - its not vital but would make the code a...
44
by: Simon Morgan | last post by:
Hi, Can somebody please help me grok the offsetof() macro? I've found an explanation on http://www.embedded.com/shared/printableArticle.jhtml?articleID=18312031 but I'm afraid it still...
7
by: Timo Haberkern | last post by:
Hi there, i have some troubles with my TSearch2 Installation. I have done this installation as described in http://www.sai.msu.su/~megera/oddmuse/index.cgi/Tsearch_V2_compound_words...
5
by: fab | last post by:
Hello, i'm trying to browse a UNC share through an ASP.NET application and i've got a problem : i've tried some examples from MSDN or other web sites (using LogonUser from Win32 API) and it...
23
by: wylbur37 | last post by:
I'm running an Apache server on my own computer (Windows XP Pro). I wrote a simple PHP script (called test3.php) that I'm running by putting the following URL in the address bar of the browser...
10
by: Praveen.Kumar.SP | last post by:
Hi Could anyone solve the problem for the code below The Code: #include "stdio.h" #include "iostream.h" void Temp( int a, char* str,...)
1
by: Daniel Nogradi | last post by:
It might be slightly off topic here but couldn't find a more suitable place for this question: I'm trying to build the python binding for ming -- http://ming.sf.net -- but for some reason the...
4
by: Gestorm | last post by:
Hi all, I found a macro "USE_VAR" in the code of bash-3.2 as follows: /*file: bash-3.2/shell.c*/ 344 USE_VAR(argc); 345 USE_VAR(argv); 346 USE_VAR(env); 347 USE_VAR(code); 348 ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.