J
Jimmy_Vegas
Version: 2008
Operating System: Mac OS X 10.6 (Snow Leopard)
Processor: Intel
Hello All,
The script I'm writing gathers input from display dialogs then formats the information to be written into MS Word. The paragraph formatting changes throughout the document, and I'm using bookmarks to hold insertion points. Sometimes, an straight paragraph format gets inserted into a numbered list, and the numbering has to pick up again after that insertion.
In the code listed below, the paragraph needs to number 7 on the list. (This number changes based on other variables, else I would just hard code it.)
I've gone through the MS Word AppleScript dictionary and been to the developer area of MacTopia and can't figure this one out.
I've commented the problematic line in the code listed below. If anyone knows the syntax of this particular command, I would greatly appreciate any help.
Code
-------------------------
tell application "Microsoft Word"
activate
select bookmark "legal_07" of active document
tell paragraph format of selection to set style to style list number
-- here's the problematic line
tell list format of selection to set list level number to 7
tell font object of selection
set name to "Times New Roman"
set bold to true
set underline to true
set font size to 12
end tell
--tell paragraph format of selection to set alignment to align paragraph left
type text selection text var_lawcn01
make new bookmark at active document with properties {name:"legal_02", text object:text object of selection}
end tell
----------------------------
/Code
I've tried several variations on this and can't quite figure it out.
Any and all help is greatly appreciated.
Operating System: Mac OS X 10.6 (Snow Leopard)
Processor: Intel
Hello All,
The script I'm writing gathers input from display dialogs then formats the information to be written into MS Word. The paragraph formatting changes throughout the document, and I'm using bookmarks to hold insertion points. Sometimes, an straight paragraph format gets inserted into a numbered list, and the numbering has to pick up again after that insertion.
In the code listed below, the paragraph needs to number 7 on the list. (This number changes based on other variables, else I would just hard code it.)
I've gone through the MS Word AppleScript dictionary and been to the developer area of MacTopia and can't figure this one out.
I've commented the problematic line in the code listed below. If anyone knows the syntax of this particular command, I would greatly appreciate any help.
Code
-------------------------
tell application "Microsoft Word"
activate
select bookmark "legal_07" of active document
tell paragraph format of selection to set style to style list number
-- here's the problematic line
tell list format of selection to set list level number to 7
tell font object of selection
set name to "Times New Roman"
set bold to true
set underline to true
set font size to 12
end tell
--tell paragraph format of selection to set alignment to align paragraph left
type text selection text var_lawcn01
make new bookmark at active document with properties {name:"legal_02", text object:text object of selection}
end tell
----------------------------
/Code
I've tried several variations on this and can't quite figure it out.
Any and all help is greatly appreciated.