Qing Xu wrote: > Hi All > > Original code: > > import win32com.client > import win32clipboard > from win32com.client import Dispatch > > ws_fc_ipn.PasteSpecial(Paste=-4163)
It would be better to use the symbolic names, like win32com.client.constants.xlPasteValues. Or: from win32com.client import constants ws_fc_ipn.PasteSpecial(constants.xlPasteValues) > Wanted copy and paste special (paste value) to selection. Gave me > > "Type Error: PasteSpecial() got an unexpected keyword argument 'Paste' " > > If anyone knows where the mistake is that would be great! Named parameters should work, although you can always fall back to positional parameters, like what I have above. What version of Python and Python-Win32 are you using? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc.
_______________________________________________ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32