rodtt
07-15-2013, 08:08 AM
Hi to all!
I opened a thread with this title on word forum, but after some tests, I think the problem is happening in excel vba code.
I'm in the process of finishing an excel file, but I'm having a difficult time with mail merge on word. I have a macro on excel to open my word document, but there's a problem. There are 3 options that happen, as following:
1) Everytime I open this word document through the macro, I have to setup mail merge once again.
2) When I directly open this word document, with my excel file closed, I get the message that data from database will be replaced on word, with the option to select yes, no or help, and selecting yes does the work fine.
3) When I open directly my word document, but with excel file also opened, I get the message that data from database will be replaced on word, as on option 2, but after selecting yes, I get another message, that this word document have links that may refer to other files and it asks me if I want to update with data from the linked files. Chosing yes or no here doesn't seem to make any difference.
I'll put the excel code to open this word document here, to see if I have to make anything differently.
Sub OpenWordFile()
Set wordapp = CreateObject("word.Application")
wordapp.documents.Open "C:\Users\rodtt\Desktop\SES\SERVIÇO PUBLICO ESTADUAL.docx"
wordapp.Visible = True
End Sub
Thanks!
I opened a thread with this title on word forum, but after some tests, I think the problem is happening in excel vba code.
I'm in the process of finishing an excel file, but I'm having a difficult time with mail merge on word. I have a macro on excel to open my word document, but there's a problem. There are 3 options that happen, as following:
1) Everytime I open this word document through the macro, I have to setup mail merge once again.
2) When I directly open this word document, with my excel file closed, I get the message that data from database will be replaced on word, with the option to select yes, no or help, and selecting yes does the work fine.
3) When I open directly my word document, but with excel file also opened, I get the message that data from database will be replaced on word, as on option 2, but after selecting yes, I get another message, that this word document have links that may refer to other files and it asks me if I want to update with data from the linked files. Chosing yes or no here doesn't seem to make any difference.
I'll put the excel code to open this word document here, to see if I have to make anything differently.
Sub OpenWordFile()
Set wordapp = CreateObject("word.Application")
wordapp.documents.Open "C:\Users\rodtt\Desktop\SES\SERVIÇO PUBLICO ESTADUAL.docx"
wordapp.Visible = True
End Sub
Thanks!