Janfry


Hi (my English is not very good but i'll try it).

When I link the datasource to the document, appears a dialog to select the text encoding. The Document.Open method has a parameter to specify the Encoding, but MailMerge.OpenDataSource does not include it.

Is there any way to not appear that dialog

Thanks,

Janfry




Re: VBA Merge question

Peter Mo.


Hi

I've never done this myself, but I had a quick look at the Help on OpenDataSource ...

Attaches a data source to the specified document, which becomes a main document if it's not one already.

Syntax

expression.OpenDataSource(Name, Format, ConfirmConversions, ReadOnly, LinkToSource, AddToRecentFiles, PasswordDocument, PasswordTemplate, Revert, WritePasswordDocument, WritePasswordTemplate, Connection, SQLStatement, SQLStatement1)

Does the Format parameter give you what you want

Format Optional Variant. The file converter used to open the document. Can be one of the following WdOpenFormat constants: wdOpenFormatAllWord, wdOpenFormatAuto, wdOpenFormatDocument, wdOpenFormatEncodedText, wdOpenFormatRTF, wdOpenFormatTemplate, wdOpenFormatText, wdOpenFormatUnicodeText, or wdOpenFormatWebPages. The default value is wdOpenFormatAuto.

Regards

Peter Mo.






Re: VBA Merge question

Janfry

The parameter Format doesn¡¯t help me.

This parameter exists too in the Open document method, but this adds "encoding" that is what I need

to not showing Word the dialog Text Conversion.

Thanks, anyway.






Re: VBA Merge question

Peter Mo.

Will setting Application.Options.DefaultTextEncoding before you do the MailMerge.OpenDataSource help.

Regards

Peter Mo.