Create New Word Document, for existing small formatted Word Documents depending on Values in Excel

m_in_spain

Board Regular
Joined
Sep 28, 2018
Messages
64
Office Version
  1. 365
Platform
  1. Windows
Hello all,
Hopefully what I am trying to do is not impossible, but I do not really know where to start.

I have my excel sheet which works out values, places them into my word template at specific bookmarks, and thanks to this forum even sends appropriate pictures to the word doc (thanks to Worf form this forum for that).

My next challenge:
I have 7 different word documents, which, depending on what is selected in my excel worksheet will select the correct word document, copy the text and formatting to anther bookmarked(?) place within my original word template, thus creating a specific document for the limited choices of sections.

I think i could embed all these documents into the excel file or have them in the same sub folder if not embedded, the smaller word documents do not require alteration within Excel (this may be required later tho), just selected and pasted back into the original word template file, it is the selection of the correct small word file which is done automatically depending on a result within the excel.

I hope i have explained the challenge clearly enough, and would value any help.

Many thanks
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Why not put all the content into the template, bookmarked as appropriate, then simply delete the unwanted bookmarked ranges according to whatever is required for the particular document?
 
Upvote 0
Thanks for the reply. That seems a jolly sensible way to do it. Basically i am trying to automate our quoting system. So if i make the full word document, excel will tell it to delete certain parts depending on the results of the calculation in excel. I can see how to get excel to the bookmark, but i dont see how to get it to delete "up to", could i do that with another bookmark? id delete from Bookmark1start to Bookmanrk1end. Can you hint the code for that please?
Many thanks
 
Upvote 0
If you bookmark the Word range applicable to a given scenario, all you need is code like:
wdDoc.Bookmarks("Scenario1").Range.Delete
where 'Scenario1' is the bookmark name.
 
Upvote 0

Forum statistics

Threads
1,213,491
Messages
6,113,963
Members
448,536
Latest member
CantExcel123

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top