
    	h                         S SK r S SKrS SKrS SKrS SKrS SKJr  S SKJr  S r	S r
S rS rS rS	 r\S
:X  a   \" 5         \" 5         \R                   " 5         gg)    Ngencache)
CheckCleanc                      [         R                  R                  S5      n U R                  (       a  [	        S5        [        U 5        O[	        S5        [         R                  R                  R                  S5      n[        U5        S n[	        S5        [         R                  R                  R                  S5      nUR                  5       nUR                  5       n[         R                  R                  R                  X4S S5      n[         R                  R                  R                  X%5      nS =n=n=pE[        U5         [	        S5         SS	KJn  UR&                  " S
5      n[        U5        g ! [         a+  n[	        SU5        [        R                   " 5          S nAN`S nAff = f! [         a+  n[	        SU5        [        R                   " 5          S nAg S nAff = f)Nz
Word.Basicz Starting Word 7 for dynamic testz Starting Word 8 for dynamic testzWord.Applicationz)Starting Word 8 for non-lazy dynamic testr   zWord dynamic tests failedz"Starting MSWord for generated testr   zWord.Application.8zWord generated tests failed)win32comclientDispatchFileNewprint	TestWord7dynamic	TestWord8_GetGoodDispatchGetTypeInfoGetTypeAttrbuildDispatchItem	CDispatch	Exception	traceback	print_excwin32com.clientr   EnsureDispatch)word7worddispatchtypeinfoattrolereprer   s           mC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\win32com/test/testMSOffice.pyTestWordr"      sx   ((6==45e 45??**334FGDdOD=>..??@RSH++-H'')Doo++88qQG??**44XGD377H7x7$dO
 

./,&&';<$  )1-  +Q/s7   AE5 	C;E5 #F- 5
F*?!F%%F*-
G"7!GG"c                 
   U R                  5         U R                  5       (       d  U R                  S5        [        S5       H-  nU R	                  US-   US-   S9  U R                  SU-  5        M/     U R                  S5        g )NAppShow      )ColorPointszHello from Python %d
   )r
   r$   _proc_range
FormatFontInsert	FileClose)r   is     r!   r   r   :   sh    LLN<<>>I2Ya!eAF3,q01  	NN1    c                    SU l         U R                  R                  5       nUR                  5       n[	        S5       H  nUR                  SUS-    S35        M     UR                  n[        U R                  R                  S5      S   5      S:  aT  [        U5       HD  u  p5US-   UR                  R                  l        SS	U-  -   UR                  R                  l        MF     OQ[	        [        U5      5       H9  nU" US-   5      nUS-   UR                  l        SS	U-  -   UR                  l        M;     UR                  S
S9  U R!                  5         ["        R$                  " S5        g )Nr&   
   zHello from Python 
.r      r%      F)SaveChangesi  )Visible	DocumentsAddRanger+   InsertAfter
ParagraphsintVersionsplit	enumerateFont
ColorIndexSizelenCloseQuitwin32apiSleep)r   docwranger/   parasps         r!   r   r   G   s!   DL
..


CYY[F2Y/Awb9: NNE
4<<c"1%&",e$DA&'!eAGGLL# "a!eAGGLL % s5z"Aa!eA !AAFFA,AFFK # II%I IIKNN4r0   c                  D     SS K n g ! [         a    [        S5         g f = f)Nr   zCan not do old style test)$win32com.test.Generated4Test.msword8ImportErrorr   )r   s    r!   TestWord8OldStylerQ   `   s"    +3 +)*+s    c                 (   SU l         U R                   (       a   S5       eSU l         U R                   (       d   S5       eU R                  R                  5         SU R                  S5      l        SU R                  S5      l        S	U R                  S
5      l        [        S5       H#  nSU-  U R                  US-   US-   5      l        M%     U R                  S5      R                  S:X  d   S5       eU R                  S5      R                  S:X  d   S5       eU R                  S5      R                  S:X  d   S5       eU R                  S5      R                  S:X  d   S5       eSU R                  S5      l        U R                  S5      R                  S:X  d   S5       eSU R                  SS5      l        SU R                  SS5      l        SS KnSU R                  S S5      l        [        R                  " UR                  5       5      U R                  S S5      l        S!U R                  S S5      l        U R                  S"5      R                  R                  5         U R                  S5      R                  S5        U R!                  5         g )#Nr   zVisible property is true.r&   zVisible property not true.r&   r)      zA1:C1xyzzA2:C2)321zA3:C3   zHi %dA1Hi 0zSingle cell range failedzA1:B1))r^   r)   z!flat-horizontal cell range failedzA1:A2))r^   )rV   zflat-vertical cell range failedzA1:C3))r^   r)   rT   )rV   zHi 1rX   )rT   r)   zHi 2zsquare cell range failed))rT   r)   r&   rU   rS   zRange was not what I set it to!z
Excel time   z=Now()r)   zPython time   zd/mm/yy h:mmzA:B)r8   	Workbooksr:   r;   Valuer+   CellsFormulatime	pythoncomMakeTimeNumberFormatColumnsEntireColumnAutoFitrF   rG   )xlr/   re   s      r!   	TextExcelrm   g   sA   BJzz666>BJ::333:LL'BHHW-BHHW-BHHW2Y'.{QA$  88D>6)E+EE)88G""n4 +4 88G"" '  ) ))  88G"" '  " "	"  FBHHW88G"" '  ) )	)  (BHHQN%BHHQN(BHHQN$--diik:BHHQN"0BHHQNJJu""**,LLO!GGIr0   c                  D   [        5          [        S5        [        R                  R                  R                  S5      n [        U 5         [        S5        [        R                  " SSSS	S
S9n[        R                  R                  S5      n [        U 5        g ! [         a-  nSn[        SU5        [        R                  " 5          S nANS nAff = f! [         a    [        S5         g [         a+  n[        SU5        [        R                  " 5          S nAg S nAff = f)Nz"Starting Excel for Dynamic test...zExcel.ApplicationFzExcel tests failedz0Starting Excel 8 for generated excel8.py test...z&{00020813-0000-0000-C000-000000000046}r   r&   r)   T)
bForDemandz/Could not import the generated Excel 97 wrapperzGenerated Excel tests failed)r"   r   r   r   r   r	   rm   r   r   r   r   EnsureModulerP   )rl   r    workedmods       r!   TestAllrs      s    J23__$$--.AB"@A##4aA$
 __%%&9:"  "A&  A?@ ,a0s6   ?B AC 
C$#CCD+	D4!DD__main__)r   rf   rH   r   win32com.client.dynamicr   r   win32com.test.utilr   r"   r   r   rQ   rm   rs   __name__CoUninitialize r0   r!   <module>rz      sa         $ )$N
2+1h4 zIL r0   