Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I have word file (template.doc) that have several links from excel file
(template.xls). Since these files are linked every time a create a new file I do the following steps: 1.- Open both templates and save them as a new files (sample1.doc and sample1.xls). 2.- In the sample1.doc file I go to edit/links and click "Change Source" and change the template.xls file to sample1.xls. Although I click the first file and then I press Shift" to select all file and then I click the change source. It is doing it one by one. I wonder if there is a way (or program) to make the change source for all the links in one time? Could you please help me with some advice? Thanks in advance. Maperalia |
#2
![]() |
|||
|
|||
![]()
You could try this:
Save the document as a Web Page and then use Notepad to Change All "old hyperlinks" to "new hyperlinks" Then re-import the htm file to Word and re-save it back to .doc Al "maperalia" wrote: I have word file (template.doc) that have several links from excel file (template.xls). Since these files are linked every time a create a new file I do the following steps: 1.- Open both templates and save them as a new files (sample1.doc and sample1.xls). 2.- In the sample1.doc file I go to edit/links and click "Change Source" and change the template.xls file to sample1.xls. Although I click the first file and then I press Shift" to select all file and then I click the change source. It is doing it one by one. I wonder if there is a way (or program) to make the change source for all the links in one time? Could you please help me with some advice? Thanks in advance. Maperalia |
#3
![]() |
|||
|
|||
![]()
Al;
Thanks for your advice. However, I think that will be too much steps to get the update of the links. The file is being used by people that do not have too much computer knowledge (like me). For that reason I want to automate it. Thanks again. Maperalia "Al" wrote: You could try this: Save the document as a Web Page and then use Notepad to Change All "old hyperlinks" to "new hyperlinks" Then re-import the htm file to Word and re-save it back to .doc Al "maperalia" wrote: I have word file (template.doc) that have several links from excel file (template.xls). Since these files are linked every time a create a new file I do the following steps: 1.- Open both templates and save them as a new files (sample1.doc and sample1.xls). 2.- In the sample1.doc file I go to edit/links and click "Change Source" and change the template.xls file to sample1.xls. Although I click the first file and then I press Shift" to select all file and then I click the change source. It is doing it one by one. I wonder if there is a way (or program) to make the change source for all the links in one time? Could you please help me with some advice? Thanks in advance. Maperalia |
#4
![]() |
|||
|
|||
![]()
Perhaps a MACRO can be written do do this either one file at a time or all
the files at once. It would be a bit of work to do but there is lots of help on the intener to do this type of thing eg: http://forums.techguy.org/archive/t-404799.html Al "maperalia" wrote: Al; Thanks for your advice. However, I think that will be too much steps to get the update of the links. The file is being used by people that do not have too much computer knowledge (like me). For that reason I want to automate it. Thanks again. Maperalia "Al" wrote: You could try this: Save the document as a Web Page and then use Notepad to Change All "old hyperlinks" to "new hyperlinks" Then re-import the htm file to Word and re-save it back to .doc Al "maperalia" wrote: I have word file (template.doc) that have several links from excel file (template.xls). Since these files are linked every time a create a new file I do the following steps: 1.- Open both templates and save them as a new files (sample1.doc and sample1.xls). 2.- In the sample1.doc file I go to edit/links and click "Change Source" and change the template.xls file to sample1.xls. Although I click the first file and then I press Shift" to select all file and then I click the change source. It is doing it one by one. I wonder if there is a way (or program) to make the change source for all the links in one time? Could you please help me with some advice? Thanks in advance. Maperalia |
#5
![]() |
|||
|
|||
![]()
Al;
Thanks for answer me again and sent more information. I read the web you sent me but does not have what I am looking for. I wonder if can help me to adjust the program I have to save as excel and word files from the templates files. The program save the excel file without problem, however, the word statement I wrote does not work (see below). Basically, this is what I need: 1.- I open the excel template (template.xls) 2.- Run the macro to save the excel file. The filename will have the information from the cells. 3.- The same macro described in step 2 will open the word template file (template.doc) 4.- Then will save it with the same filename I use in the step 2.. Could you please help me to make it run? Thanks in advance. Maperalia P.D. Later I will figure it out to automate the change source in all files €˜*******PROGRAM STARTS**************** Option Explicit Public Sub SaveAsTemplateFiles() SaveExcelTemplateAsSaveAs SaveWordTemplatelAsSaveAs End Sub Sub SaveExcelTemplateAsSaveAs() Dim WO As String Dim sFilename As String Dim Progname As String Dim Filename As String Dim myDateTime As String WO = Worksheets("summary BLR").Range("M10") myDateTime = Format(Worksheets("summary BLR").Range("M9").Value, "yyyymmdd") Filename = "" & WO & "_" & myDateTime & "" Progname = "C:\Forms\" & Filename & ".xls" ActiveWorkbook.SaveCopyAs Progname End Sub '***********OPEN THE TEMPLATE WORD FILE AND SAVE ************** Sub SaveWordTemplatelAsSaveAs() Dim wordApp As Object Dim fNameAndPath As String Dim Filename As String Dim WO As String Dim myDateTime As String fNameAndPath = "C:\Forms\Template.doc" Set wordApp = CreateObject("Word.Application") wordApp.Documents.Open (fNameAndPath) wordApp.Visible = True wordApp.Activate Filename = "" & WO & "_" & myDateTime & "" ActiveDocument.SaveAs Filename:="C:\Forms\" & Filename & ".doc" End Sub '************************************************* ********* €˜*******PROGRAM ENDS**************** "Al" wrote: Perhaps a MACRO can be written do do this either one file at a time or all the files at once. It would be a bit of work to do but there is lots of help on the intener to do this type of thing eg: http://forums.techguy.org/archive/t-404799.html Al "maperalia" wrote: Al; Thanks for your advice. However, I think that will be too much steps to get the update of the links. The file is being used by people that do not have too much computer knowledge (like me). For that reason I want to automate it. Thanks again. Maperalia "Al" wrote: You could try this: Save the document as a Web Page and then use Notepad to Change All "old hyperlinks" to "new hyperlinks" Then re-import the htm file to Word and re-save it back to .doc Al "maperalia" wrote: I have word file (template.doc) that have several links from excel file (template.xls). Since these files are linked every time a create a new file I do the following steps: 1.- Open both templates and save them as a new files (sample1.doc and sample1.xls). 2.- In the sample1.doc file I go to edit/links and click "Change Source" and change the template.xls file to sample1.xls. Although I click the first file and then I press Shift" to select all file and then I click the change source. It is doing it one by one. I wonder if there is a way (or program) to make the change source for all the links in one time? Could you please help me with some advice? Thanks in advance. Maperalia |
#6
![]() |
|||
|
|||
![]()
You seem to have an issue with transferring the information from the Excel
macro to the Word macro, perhaps that question is best posted to the Programming section For me, the best way to get that information would be to prompt the user to insert it through a Message Box - I am not that experienced in macros so perhaps others may have much better solutions. Sorry I can't help further Al "maperalia" wrote: Al; Thanks for answer me again and sent more information. I read the web you sent me but does not have what I am looking for. I wonder if can help me to adjust the program I have to save as excel and word files from the templates files. The program save the excel file without problem, however, the word statement I wrote does not work (see below). Basically, this is what I need: 1.- I open the excel template (template.xls) 2.- Run the macro to save the excel file. The filename will have the information from the cells. 3.- The same macro described in step 2 will open the word template file (template.doc) 4.- Then will save it with the same filename I use in the step 2.. Could you please help me to make it run? Thanks in advance. Maperalia P.D. Later I will figure it out to automate the change source in all files €˜*******PROGRAM STARTS**************** Option Explicit Public Sub SaveAsTemplateFiles() SaveExcelTemplateAsSaveAs SaveWordTemplatelAsSaveAs End Sub Sub SaveExcelTemplateAsSaveAs() Dim WO As String Dim sFilename As String Dim Progname As String Dim Filename As String Dim myDateTime As String WO = Worksheets("summary BLR").Range("M10") myDateTime = Format(Worksheets("summary BLR").Range("M9").Value, "yyyymmdd") Filename = "" & WO & "_" & myDateTime & "" Progname = "C:\Forms\" & Filename & ".xls" ActiveWorkbook.SaveCopyAs Progname End Sub '***********OPEN THE TEMPLATE WORD FILE AND SAVE ************** Sub SaveWordTemplatelAsSaveAs() Dim wordApp As Object Dim fNameAndPath As String Dim Filename As String Dim WO As String Dim myDateTime As String fNameAndPath = "C:\Forms\Template.doc" Set wordApp = CreateObject("Word.Application") wordApp.Documents.Open (fNameAndPath) wordApp.Visible = True wordApp.Activate Filename = "" & WO & "_" & myDateTime & "" ActiveDocument.SaveAs Filename:="C:\Forms\" & Filename & ".doc" End Sub '************************************************* ********* €˜*******PROGRAM ENDS**************** "Al" wrote: Perhaps a MACRO can be written do do this either one file at a time or all the files at once. It would be a bit of work to do but there is lots of help on the intener to do this type of thing eg: http://forums.techguy.org/archive/t-404799.html Al "maperalia" wrote: Al; Thanks for your advice. However, I think that will be too much steps to get the update of the links. The file is being used by people that do not have too much computer knowledge (like me). For that reason I want to automate it. Thanks again. Maperalia "Al" wrote: You could try this: Save the document as a Web Page and then use Notepad to Change All "old hyperlinks" to "new hyperlinks" Then re-import the htm file to Word and re-save it back to .doc Al "maperalia" wrote: I have word file (template.doc) that have several links from excel file (template.xls). Since these files are linked every time a create a new file I do the following steps: 1.- Open both templates and save them as a new files (sample1.doc and sample1.xls). 2.- In the sample1.doc file I go to edit/links and click "Change Source" and change the template.xls file to sample1.xls. Although I click the first file and then I press Shift" to select all file and then I click the change source. It is doing it one by one. I wonder if there is a way (or program) to make the change source for all the links in one time? Could you please help me with some advice? Thanks in advance. Maperalia |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
change a main doc into a data source | Mailmerge | |||
inserting tiff files into word docs and the margins change. | Microsoft Word Help | |||
Change data source type | Mailmerge | |||
Can you save individual document pages as seperate word files? | Mailmerge | |||
Files open as read only | Microsoft Word Help |