Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Data Source Location Change
I have a word merge (word 2002) linked to an excel file (data source) with a
macro. I need to change the location of the data source. When I do this some of the formatting changes in the merge doc. For example; several field in the data source are currency formated to two decimal places. Works great as long as I do not change the data source location. Once I change the data source location the formatting on the merge doc changes to no decimals. Any ideas as to why this may be happening? Any assistance will be greatly appreaciated. I thank you in advance for help or ideas you may be able to provide. -- Randy Street Rancho Cucamonga, CA |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Data Source Location Change
Can you provide the macro code you use to open the data source (assuming
that is what your macro does)? The most likely reason for this is that you have set up a connection using one method (e.g. DDE, which would open a copy of Excel) and your code opens using another method (probably OLEDB). Peter Jamieson "Randy" wrote in message news I have a word merge (word 2002) linked to an excel file (data source) with a macro. I need to change the location of the data source. When I do this some of the formatting changes in the merge doc. For example; several field in the data source are currency formated to two decimal places. Works great as long as I do not change the data source location. Once I change the data source location the formatting on the merge doc changes to no decimals. Any ideas as to why this may be happening? Any assistance will be greatly appreaciated. I thank you in advance for help or ideas you may be able to provide. -- Randy Street Rancho Cucamonga, CA |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Data Source Location Change
Here is the macro code that actually opens the merge doc...
Sub MyMacro() Documents.Open FileName:="S:\Yardi45\3 Day Merge.doc" With Documents("3 Day Merge.doc").MailMerge .Destination = wdSendToNewDocument .Execute End With Documents("3 Day Merge.doc").Close _ SaveChanges:=wdDoNotSaveChanges End Sub -- Randy Street Rancho Cucamonga, CA "Peter Jamieson" wrote: Can you provide the macro code you use to open the data source (assuming that is what your macro does)? The most likely reason for this is that you have set up a connection using one method (e.g. DDE, which would open a copy of Excel) and your code opens using another method (probably OLEDB). Peter Jamieson "Randy" wrote in message news I have a word merge (word 2002) linked to an excel file (data source) with a macro. I need to change the location of the data source. When I do this some of the formatting changes in the merge doc. For example; several field in the data source are currency formated to two decimal places. Works great as long as I do not change the data source location. Once I change the data source location the formatting on the merge doc changes to no decimals. Any ideas as to why this may be happening? Any assistance will be greatly appreaciated. I thank you in advance for help or ideas you may be able to provide. -- Randy Street Rancho Cucamonga, CA |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Data Source Location Change
-- Randy Street Rancho Cucamonga, CA "Peter Jamieson" wrote: Can you provide the macro code you use to open the data source (assuming that is what your macro does)? The most likely reason for this is that you have set up a connection using one method (e.g. DDE, which would open a copy of Excel) and your code opens using another method (probably OLEDB). Peter Jamieson "Randy" wrote in message news I have a word merge (word 2002) linked to an excel file (data source) with a macro. I need to change the location of the data source. When I do this some of the formatting changes in the merge doc. For example; several field in the data source are currency formated to two decimal places. Works great as long as I do not change the data source location. Once I change the data source location the formatting on the merge doc changes to no decimals. Any ideas as to why this may be happening? Any assistance will be greatly appreaciated. I thank you in advance for help or ideas you may be able to provide. -- Randy Street Rancho Cucamonga, CA Ooops...I don't think I provided you what you were asking...let me get back to you on that one... Is there another way to link to an excel spreadsheet other than the merge wizard? |
#5
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Data Source Location Change
You can use Word VBA's OpenDataSource method. The connection will be made
using DDE, OLEDB, or ODBC depending on the parameters you provide. Beyond that, I've run out of time for now so maybe you could use Google Groups to search this group for examples, e.g. using "Jamieson OpenDataSource xls" or some such. Peter Jamieson "Randy" wrote in message ... -- Randy Street Rancho Cucamonga, CA "Peter Jamieson" wrote: Can you provide the macro code you use to open the data source (assuming that is what your macro does)? The most likely reason for this is that you have set up a connection using one method (e.g. DDE, which would open a copy of Excel) and your code opens using another method (probably OLEDB). Peter Jamieson "Randy" wrote in message news I have a word merge (word 2002) linked to an excel file (data source) with a macro. I need to change the location of the data source. When I do this some of the formatting changes in the merge doc. For example; several field in the data source are currency formated to two decimal places. Works great as long as I do not change the data source location. Once I change the data source location the formatting on the merge doc changes to no decimals. Any ideas as to why this may be happening? Any assistance will be greatly appreaciated. I thank you in advance for help or ideas you may be able to provide. -- Randy Street Rancho Cucamonga, CA Ooops...I don't think I provided you what you were asking...let me get back to you on that one... Is there another way to link to an excel spreadsheet other than the merge wizard? |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Word 2003 Mail Merge Problem when E-Mailing Data Source | Mailmerge | |||
Data Trucated in word merge with excel source | Mailmerge | |||
Maniplulating the data source location of a merge, MS Word merge | Mailmerge | |||
Specific Email Merge w/ Specific Attachements | Mailmerge | |||
multiple docs, one data source | Mailmerge |