insert object (file)- how to separate it, and use it later?

K

KR

I have a word project where one of the limitations is that I can only deploy
a single (word) file. While I have much of my functionality working, I think
it would be so much easier if I could keep some of my code and other
information in a separate file- but, I can't deploy it that way.

I've never used "insert object" before, but when I do (tested on a .pdf
file) it gives me a .pdf icon and clicking on it opens the file. This seems
promising, where I could insert a few files- but only if I can figure out
how to use VBA to detach the files once the user has them (I know when the
files need to be detached, just don't know how). I have figured out how to
get my template to "self-install" into the template directory, so I'd just
detach the files into the same directory so the template could access them
in the same folder.

Question 1:
What commands should I look at in VBA to detach inserted objects?

Question 2:
How do I identify the name or ID of the appropriate object (if I have more
than one attached)

Question 3:
Is there a way to attach the file(s) but _not_ have them show up in the
document itself? No sense having a .dll that novice users try to click on,
or a source access database, etc.

Many, many thanks in advance,
Keith
 
K

KR

<edited for clarity and brevity>

When I use (menu) "insert object" and attach a file within a word document,
I get an icon for that file.

If I know the source of the target file, how do I do the same thing via VBA?

and later, if I know the destination directory, how do I do the reverse
(detach the file)? Especially if I have more than one file attached, and
only want to detach certain files at a particular time...

Thanks in advance,
Keith
 

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