Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: 1257 Type Mismatched error named parameters
Set myDoc = Documents.Add With myDoc.MailMerge .MainDocumentType = wdFormLetters .OpenDataSource _ Name:="C:\MSOffice\Access\Samples\Northwind.mdb", _ LinkToSource:=True, AddToRecentFiles:=False, _ Connection:="TABLE Orders End With how do you format multiple parameters in the winbatch statement. Here is what I have that doesn't work. testdoc = "c:\mailmerge.doc" wdOpenFormatAuto = 0 MMrgDSNCS = "QUERY Check List" MMrgDSNQS = "SELECT * FROM [Check List]" App = ObjectOpen("Word.Application") Docs = App.Documents Doc = Docs.Open(testdoc) MMrgObj = Doc.MailMerge MMrgObj.OpenDataSource(newDSN, LinkToSource=1, Format = wdOpenFormatAuto, Connection = MMrgDSNCS, SQLStatement = MMrgDSNQS)I tried this and I get a 1257 Type Mismatched error:
MMrgObj.OpenDataSource(newDSN,"LinkToSource:=True","Connection:=%MMrgDSNCS%","SQLStatement:=%MMrgDSNQS%")Thanks for your help!!!!
MMrgObj.OpenDataSource(newDSN:: LinkToSource=1, Format = wdOpenFormatAuto, Connection = MMrgDSNCS, SQLStatement = MMrgDSNQS)
My error is OLE Error 1257: OLE: Type Mismatch.My code to this point looks like this:
session = objectopen("Notes.NotesSession") db = session.getdatabase("", "names.nsf") doc = db.CreateDocument doc.sendto("steve buechler")I get this error on line 4. All I'm attempting to do is set the value of the item SendTo on a Lotus Notes document. Any ideas what I'm doing wrong?
Try this instead....
session = objectopen("Notes.NotesSession") db = session.getdatabase("", "names.nsf") doc = db.CreateDocument doc.sendto ="steve buechler"
Article ID: W14674
Filename: OLE and Passing Parameters.txt
File Created: 2001:04:02:11:54:42
Last Updated: 2001:04:02:11:54:42