B
Byron
Hi, Albert,
First, thanks for all of your hard work and the WordMerge
routine. It is great.
I do have one issue that I have not been able to
incorporate into your routine. I want to save the merged
document to a specific path and filename when the merge
is completed. I have tried the following code, with no
success. Here is the code from near the end of
your "RidesMergeWord" function:
WordDoc.Close (False)
wordApp.Visible = True
wordApp.Windows(wordApp.Windows.Count).Activate
MyPbar.HideProgress
' AppActivate "Microsoft Word"
wordApp.Activate
wordApp.WindowState = 0 'wdWindowStateRestore
wordApp.SaveAs strSaveDocTo & strNameOfDoc & ".doc"
Set wordApp = Nothing
Set WordDoc = Nothing
Set MyPbar = Nothing
Please note the:
wordApp.SaveAs strSaveDocTo & strNameOfDoc & ".doc"
statement. This is the statement that I am attempting to
use to save the merged document. I still want the merged
document to be the active document, after it is saved to
the new path and filename.
Thanks for any help,
Byron
First, thanks for all of your hard work and the WordMerge
routine. It is great.
I do have one issue that I have not been able to
incorporate into your routine. I want to save the merged
document to a specific path and filename when the merge
is completed. I have tried the following code, with no
success. Here is the code from near the end of
your "RidesMergeWord" function:
WordDoc.Close (False)
wordApp.Visible = True
wordApp.Windows(wordApp.Windows.Count).Activate
MyPbar.HideProgress
' AppActivate "Microsoft Word"
wordApp.Activate
wordApp.WindowState = 0 'wdWindowStateRestore
wordApp.SaveAs strSaveDocTo & strNameOfDoc & ".doc"
Set wordApp = Nothing
Set WordDoc = Nothing
Set MyPbar = Nothing
Please note the:
wordApp.SaveAs strSaveDocTo & strNameOfDoc & ".doc"
statement. This is the statement that I am attempting to
use to save the merged document. I still want the merged
document to be the active document, after it is saved to
the new path and filename.
Thanks for any help,
Byron