Python论坛  - 讨论区

标题:[python-chinese] 求word的API函数,用于写脚本。

2006年06月22日 星期四 09:21

=?ISO-2022-JP?B?GyRCS3xOTxsoQg==?= wanliyou at gmail.com
Thu Jun 22 09:21:20 HKT 2006

求word的API函数,用于写脚本。
有地址或e文都行,谢谢各位!

-- 
--==Best Regards From WanLi==--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060622/0edc4bfb/attachment.html

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年06月22日 星期四 13:22

Baif.Pogo baif at pogolinux.com.cn
Thu Jun 22 13:22:09 HKT 2006

http://doc.zoomquiet.org/
On Thursday 22 June 2006 09:21, 万力 wrote:
> 求word的API函数,用于写脚本。
> 有地址或e文都行,谢谢各位!

-- 
PogoLinux(Shanghai),Inc. http://www.pogolinux.com.cn (8621)50308860 Ext.31

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年06月22日 星期四 13:44

齐辰雄 qcxhome at gmail.com
Thu Jun 22 13:44:32 HKT 2006

看Word的帮助文件。

Microsoft Word Visual Basic参考部分

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年06月23日 星期五 07:23

shhgs shhgs.efhilt at gmail.com
Fri Jun 23 07:23:37 HKT 2006

直接耍COM

On 6/22/06, 齐辰雄 <qcxhome at gmail.com> wrote:
> 看Word的帮助文件。
>
> Microsoft Word Visual Basic参考部分
>
> _______________________________________________
> python-chinese
> Post: send python-chinese at lists.python.cn
> Subscribe: send subscribe to python-chinese-request at lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request at lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
>

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年06月23日 星期五 11:34

笨笨狗 chen.ruijie at gmail.com
Fri Jun 23 11:34:12 HKT 2006

在 06-6-23,shhgs<shhgs.efhilt at gmail.com> 写道:
> 直接耍COM
>

用python也可以调用com吧?不知道写起来感觉如何,想看看

-- 
云电清华同方小民工

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年06月23日 星期五 11:39

Ocean Chen chocean at gmail.com
Fri Jun 23 11:39:36 HKT 2006

To use a COM object from Python

import win32com.client
o = win32com.client.Dispatch("Object.Name")
o.Method()
o.property = "New Value"
print o.property

Example

o = win32com.client.Dispatch("Excel.Application")
o.Visible = 1
o.Workbooks.Add() # for office 97 ¨C 95 a bit different!
o.Cells(1,1).Value = "Hello"

And we will see the word "Hello" appear in the top cell.


ÔÚ06-6-23£¬±¿±¿¹· <chen.ruijie at gmail.com> дµÀ£º
>
> ÔÚ 06-6-23£¬shhgs<shhgs.efhilt at gmail.com> дµÀ£º
> > Ö±½ÓË£COM
> >
>
> ÓÃpythonÒ²¿ÉÒÔµ÷ÓÃcom°É£¿²»ÖªµÀдÆðÀ´¸Ð¾õÈçºÎ£¬Ïë¿´¿´
>
> --
> ÔƵçÇ廪ͬ·½Ð¡Ãñ¹¤
>
> _______________________________________________
> python-chinese
> Post: send python-chinese at lists.python.cn
> Subscribe: send subscribe to python-chinese-request at lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request at lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
>


-- 
Ocean
mail: chocean at gmail.com
homepage: www.oceanisland.com.cn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060623/7c2addc3/attachment.html

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年06月23日 星期五 16:44

万力 wanliyou at gmail.com
Fri Jun 23 16:44:03 HKT 2006

Thank you,guys!
I think use Macro & record it in VBS is also a way to approach.
Thanks again!


On 6/23/06, Ocean Chen <chocean at gmail.com> wrote:
>
>  To use a COM object from Python
>
> import win32com.client
> o = win32com.client.Dispatch("Object.Name")
> o.Method()
> o.property = "New Value"
> print o.property
>
> Example
>
> o = win32com.client.Dispatch("Excel.Application")
> o.Visible = 1
> o.Workbooks.Add() # for office 97 ¨C 95 a bit different!
> o.Cells(1,1).Value = "Hello"
>
> And we will see the word "Hello" appear in the top cell.
>
>
> ÔÚ06-6-23£¬±¿±¿¹· <chen.ruijie at gmail.com> дµÀ£º
> >
> > ÔÚ 06-6-23£¬shhgs<shhgs.efhilt at gmail.com> дµÀ£º
> > Ö±½ÓË£COM
> >
>
> ÓÃpythonÒ²¿ÉÒÔµ÷ÓÃcom°É£¿²»ÖªµÀдÆðÀ´¸Ð¾õÈçºÎ£¬Ïë¿´¿´
>
> --
> ÔƵçÇ廪ͬ·½Ð¡Ãñ¹¤
>
> _______________________________________________
> python-chinese
> Post: send python-chinese at lists.python.cn
> Subscribe: send subscribe to python-chinese-request at lists.python.cn
> Unsubscribe: send unsubscribe to   python-chinese-request at lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
>
>
>
> --
> Ocean
> mail: chocean at gmail.com
> homepage: www.oceanisland.com.cn
>
> _______________________________________________
> python-chinese
> Post: send python-chinese at lists.python.cn
> Subscribe: send subscribe to python-chinese-request at lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request at lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
>


-- 
--==Best Regards From WanLi==--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060623/bd1e4890/attachment.htm

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号