Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moving MS-Word own toolbars
#1
Happy New Year to all QM-users!

I am in need of any advice - experience on the issue of moving (drag-and-drop), using QM macros, MS-Word own toolbars, from the point found when opening MS-Word to a pre-defined point.

Thanks in advance.
#2
Actually, this is a typical sample of the part of a code I use, I wonder whether there exists something more elegant :

Function MSWord_ToolbarsRear
Code:
Copy      Help
int w=act(win("- Microsoft Word" "OpusApp"))

;Line 2 - Standard Toolbar
int cb x y cx cy ct1 x1 y1 cx1 cy1 ct2 x2 y2 cx2 cy2 ct3 x3 y3 cx3 cy3 d
cb=child("Standard" "MsoCommandBar" w) ;;tool bar 'Standard'
GetWinXY cb x y cx cy
;out F"{x} {y} {cx} {cy}"

ct1=child("PDFMaker 7.0" "MsoCommandBar" w) ;;tool bar 'PDFMaker 7.0'
GetWinXY ct1 x1 y1 cx1 cy1
;out F"{x1} {y1} {cx1} {cy1}"
lef+ x1 y1-cy1 w 1 ;;tool bar 'PDFMaker 7.0'
lef- x+cx+75 y-cy+3 w 1
#3
Macro Macro2463
Code:
Copy      Help
;/exe 1
out

typelib Word {00020905-0000-0000-C000-000000000046} 8.0
Word.Application a._getactive ;;connect to Word. On Vista/7, macro process must run as User. QM normally runs as Admin. The /exe 1 tells QM to run the macro in separate process, as User.

typelib Office {2DF8D04C-5BFA-101B-BDE5-00AA0044DE52} 2.3
Office.CommandBars bc=a.CommandBars
Office.CommandBar b

foreach b bc
,if(!b.Visible) continue
,str name=b.Name
,int x(b.Left) y(b.Top)
,out F"{name}  {x} {y}"

b=bc.Item("Web")
b.Left=b.Left+25
#4
Dear Gintaras,

Many thanks. As always a very prompt and reliable reply. Let me wish a Happy and Prosperous New Year. Best Regards.


Forum Jump:


Users browsing this thread: 1 Guest(s)