ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Editing Word Document within Excel (https://www.excelbanter.com/excel-programming/366592-editing-word-document-within-excel.html)

[email protected]

Editing Word Document within Excel
 
I am creating a dispatch system for an RV transportation company.

When an RV is dispatched to be delivered, they prepare a bill of lading
and a driver delivery agreement; the bill of lading is originally a
word document, and contains all of the legalese concerning the unit,
delivery, damages, etc. The delivery agreement basically says "this is
what we will pay for the trip". The delivery agreement is an original
excel document.

What I am writing is when the user dispatches Unit 12345 to be
delivered by driver 999, for example, it will create (from database
entries within excel), a properly formatted Bill of Lading. When Unit
12345 is scheduled for delivery and initially accepted by the company
for transport, the recipient RV dealership is already defined, and will
be defined in the database; as well as the manufacturer. The procedure
will retrieve the necessary data from the Unit and Manufacturer records
to create the B/L.

Is there a way, from within Excel, to programmatically have Excel place
these database values onto the B/L form to print the B/L form. The
original B/L was a word document, and I already have it inserted as an
object into the Excel SS. I might redesign the B/L into an Excel SS
and make it easier, but is there a way to have Excel programmatically
place the necessary values from the databases directly into the Word
object within the Excel SS?


Tim Marsh

Editing Word Document within Excel
 
Yes, you can control Word to such an extent, I have a similar system where i
record a log of all my work in a spreadsheet, which then opens a document
template and inserts items from the spreadsheet into the word document by
using a find/replace macro; i enclose the bits i want to replace in pointy
brackets like <this. as a finishing touch, it also automatically sets a
hyper-link in the spreadsheet straight to the document.

unfortunately, i don't have that spreadsheet on this laptop and the code is
too long-winded for me to start writing it from scratch now! I'm sure
someone much more professional than me will be along shortly with the
answer. but if you have any specific questions, post them and i'll try and
answer.

hth,

Tim


wrote in message
oups.com...
I am creating a dispatch system for an RV transportation company.

When an RV is dispatched to be delivered, they prepare a bill of lading
and a driver delivery agreement; the bill of lading is originally a
word document, and contains all of the legalese concerning the unit,
delivery, damages, etc. The delivery agreement basically says "this is
what we will pay for the trip". The delivery agreement is an original
excel document.

What I am writing is when the user dispatches Unit 12345 to be
delivered by driver 999, for example, it will create (from database
entries within excel), a properly formatted Bill of Lading. When Unit
12345 is scheduled for delivery and initially accepted by the company
for transport, the recipient RV dealership is already defined, and will
be defined in the database; as well as the manufacturer. The procedure
will retrieve the necessary data from the Unit and Manufacturer records
to create the B/L.

Is there a way, from within Excel, to programmatically have Excel place
these database values onto the B/L form to print the B/L form. The
original B/L was a word document, and I already have it inserted as an
object into the Excel SS. I might redesign the B/L into an Excel SS
and make it easier, but is there a way to have Excel programmatically
place the necessary values from the databases directly into the Word
object within the Excel SS?




Gonzo

Editing Word Document within Excel
 
I honestly don't know if you can change a Word object that's embedded
in Excel.

The proper way would be to either (as you said) convert this document
to an Excel spreadsheet, or to programmatically modify the Word
document from within Excel (which is not that difficult, lots of
information to be found on the www).

By the way, what's an RV...?

schreef:

I am creating a dispatch system for an RV transportation company.

When an RV is dispatched to be delivered, they prepare a bill of lading
and a driver delivery agreement; the bill of lading is originally a
word document, and contains all of the legalese concerning the unit,
delivery, damages, etc. The delivery agreement basically says "this is
what we will pay for the trip". The delivery agreement is an original
excel document.

What I am writing is when the user dispatches Unit 12345 to be
delivered by driver 999, for example, it will create (from database
entries within excel), a properly formatted Bill of Lading. When Unit
12345 is scheduled for delivery and initially accepted by the company
for transport, the recipient RV dealership is already defined, and will
be defined in the database; as well as the manufacturer. The procedure
will retrieve the necessary data from the Unit and Manufacturer records
to create the B/L.

Is there a way, from within Excel, to programmatically have Excel place
these database values onto the B/L form to print the B/L form. The
original B/L was a word document, and I already have it inserted as an
object into the Excel SS. I might redesign the B/L into an Excel SS
and make it easier, but is there a way to have Excel programmatically
place the necessary values from the databases directly into the Word
object within the Excel SS?



Tim Marsh

Editing Word Document within Excel
 
ah - i missd the bit about it being embedded into the spreadsheet; but i'm
still pretty sure you must be able to refer to it as a Word object. though
having said that, if you are going to the trouble of embedding a word doc in
a spreadsheet, you might as well make the whole thing spreadsheet based.

i think an RV is a Recreation Vehicle?! we don't have such things in jolly
old England... but I'm sure they talked about them on 'The A-Team' back in
the day


"Gonzo" wrote in message
oups.com...
I honestly don't know if you can change a Word object that's embedded
in Excel.

The proper way would be to either (as you said) convert this document
to an Excel spreadsheet, or to programmatically modify the Word
document from within Excel (which is not that difficult, lots of
information to be found on the www).

By the way, what's an RV...?

schreef:

I am creating a dispatch system for an RV transportation company.

When an RV is dispatched to be delivered, they prepare a bill of lading
and a driver delivery agreement; the bill of lading is originally a
word document, and contains all of the legalese concerning the unit,
delivery, damages, etc. The delivery agreement basically says "this is
what we will pay for the trip". The delivery agreement is an original
excel document.

What I am writing is when the user dispatches Unit 12345 to be
delivered by driver 999, for example, it will create (from database
entries within excel), a properly formatted Bill of Lading. When Unit
12345 is scheduled for delivery and initially accepted by the company
for transport, the recipient RV dealership is already defined, and will
be defined in the database; as well as the manufacturer. The procedure
will retrieve the necessary data from the Unit and Manufacturer records
to create the B/L.

Is there a way, from within Excel, to programmatically have Excel place
these database values onto the B/L form to print the B/L form. The
original B/L was a word document, and I already have it inserted as an
object into the Excel SS. I might redesign the B/L into an Excel SS
and make it easier, but is there a way to have Excel programmatically
place the necessary values from the databases directly into the Word
object within the Excel SS?





[email protected]

Editing Word Document within Excel
 
I was able to draw up a Bill of Lading within Excel that looks VERY
close to the one in word, so I'm just going to have excel place values
at x,y within a range - keep it simple!

Yes, an RV is a recreational vehicle.


Thanks to all



All times are GMT +1. The time now is 06:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com