Can I get Properties of an embedded file?

E

Ed from AZ

With Word and Excel 2003 - I'm using InlineShapes.AddOLEObject to add
Excel files to a Word document. The files are already there - I just
need to go get updated XL files when I update this report.

Is there a way to get the original file location from the embedded
file, so I can read it with VBA and my code will "know" where to get
the updated file? If not, what would be a good way to save this file
path and name the first time I embed the file so the code can pick it
up?

Ed
 
M

macropod

Hi Ed,

The 'best' way might be to insert the Excel file as a linked object in the first place (this stores the path in a LINK field). Then
you won't need vba to update it - it can be updated by simply refreshing the link (if necessary) in the Word file anytime to Excel
workbook is updated.

Cheers
 
E

Ed from AZ

I'm not sure that will work, macropod. I have to email this report
out to places that will not have access to the linked files. If all
that is inserted in my doc are links, they won't be able to open the
Excel files, will they?

Ed

Hi Ed,

The 'best' way might be to insert the Excel file as a linked object in thefirst place (this stores the path in a LINK field). Then
you won't need vba to update it - it can be updated by simply refreshing the link (if necessary) in the Word file anytime to Excel
workbook is updated.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------



With Word and Excel 2003 - I'm using InlineShapes.AddOLEObject to add
Excel files to a Word document.  The files are already there - I just
need to go get updated XL files when I update this report.
Is there a way to get the original file location from the embedded
file, so I can read it with VBA and my code will "know" where to get
the updated file?  If not, what would be a good way to save this file
path and name the first time I embed the file so the code can pick it
up?
Ed- Hide quoted text -

- Show quoted text -
 
M

macropod

Hi Ed,

You can break (Ctrl-Shift-F9) or lock the link (Ctrl-F11) before emailing.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

I'm not sure that will work, macropod. I have to email this report
out to places that will not have access to the linked files. If all
that is inserted in my doc are links, they won't be able to open the
Excel files, will they?

Ed

Hi Ed,

The 'best' way might be to insert the Excel file as a linked object in the first place (this stores the path in a LINK field).
Then
you won't need vba to update it - it can be updated by simply refreshing the link (if necessary) in the Word file anytime to Excel
workbook is updated.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------



With Word and Excel 2003 - I'm using InlineShapes.AddOLEObject to add
Excel files to a Word document. The files are already there - I just
need to go get updated XL files when I update this report.
Is there a way to get the original file location from the embedded
file, so I can read it with VBA and my code will "know" where to get
the updated file? If not, what would be a good way to save this file
path and name the first time I embed the file so the code can pick it
up?
Ed- Hide quoted text -

- Show quoted text -
 
C

c.g.nash

Is there any way of getting at the embedded file from VBA (not quite
Ed question - he wanted the original file)
For instance when you open an embedded the file it is placed in a
temprary directory.
what I would like is a some thing like a path to the embedded file.
My particular use is I want each word file to have its own custom
dictionary that moves arround wiith it (emailing etc)
Chad
 

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