Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Dennis Lee Bieber Newsgroups: comp.lang.python Subject: Re: Python and Word OLE Date: Fri, 15 Jan 2016 08:02:43 -0500 Organization: IISS Elusive Unicorn Lines: 30 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de W5YrF4zWgTBgXpKdRwSSbwnsnIZLdOGq7x2YRqOd2GZA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'skip:\\ 10': 0.07; 'message-id:@4ax.com': 0.09; 'portions': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'jan': 0.11; 'thu,': 0.15; '2016': 0.16; 'pythonwin': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'skip:> 20': 0.16; 'url:home': 0.18; 'python?': 0.18; '>>>': 0.20; 'sep': 0.22; 'bit': 0.23; 'header:X-Complaints-To:1': 0.26; 'print': 0.30; 'skip:> 10': 0.35; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'charset:us-ascii': 0.37; 'version': 0.38; 'to:addr:python.org': 0.40; 'mark': 0.40; 'email addr:gmail.com': 0.62; 'further': 0.62; 'skip:w 30': 0.64; 'skip:w 40': 0.66; '2013,': 0.91; 'dennis': 0.91 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: adsl-108-79-218-6.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:101750 On Thu, 14 Jan 2016 22:03:37 -0800 (PST), tdsperth@gmail.com declaimed the following: > >wordapp = win32com.client.Dispatch('Word.Application') >worddoc = wordapp.Documents.Open(mypathfile) >print(wordapp.ActivePrinter) >"\\server\queries" >wordapp.ActivePrinter = "\\server\letters" //fails on this line > Which version of Python? PythonWin 2.7.5 (default, Sep 16 2013, 23:11:01) [MSC v.1500 64 bit (AMD64)] on win32. Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for further copyright information. >>> print "\\server\letters" \server\letters >>> >>> print r"\\server\letters" \\server\letters >>> Note the difference? -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/