INCLUDETEXT with url

C

Cristina

Hello,
I´d like to know if it´s possible inserting a file from a macro or a
vbscript code in an word document providing an url instead of a file system path.
I´ve tried it with de Selection.Add.Fields INCLUDETEXT and with the
InsertFile functions of the API but I wasn´t succesful.
 
C

Cindy M -WordMVP-

Hi Cristina,
I´d like to know if it´s possible inserting a file from a macro or a
vbscript code in an word document providing an url instead of a file system path.
I´ve tried it with de Selection.Add.Fields INCLUDETEXT and with the
InsertFile functions of the API but I wasn´t succesful.
Which version of Word? Please describe in what manner it wasn't successful: do you
get some kind of error message, for example?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or reply in
the newsgroup and not by e-mail :)
 
C

Cristina

I´m using Word 2000.
The way it isn´t successful is that I try to include a file in the
header of my document from a vbscript code and the file isn´t inserted
because I give a url as the path of my file in the INCLUDETEXT. This
is the code I use:

WordApp.Selection.Fields.Add WordApp.Selection.Range,-1 ,"INCLUDETEXT
" & chr(34) & "http://localhost/wwwroot/cabecera.html" & chr(34)
 

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