Welcome to MacBoardz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Word 2008 Script

 
   Macintosh computer (Home) -> Apple Scripts RSS
Next:  Running Applescripts within Appleworks  
Author Message
G.Miller

External


Since: Jun 13, 2008
Posts: 7



(Msg. 1) Posted: Fri Jun 13, 2008 6:03 am
Post subject: Word 2008 Script
Archived from groups: alt>comp>lang>applescript (more info?)

hi, i have a script that i wrote a few years ago that takes
information from a filemaker database and inserts it into a word
document. this script was written before Word had any kind of
redeeming applescipt dictionary and included VBA.

bascially, the portions of the script that take the info out of
filemaker are still in tact. what im having trouble with is replacing
the 'do visual basic' commands with applescript.

i was skimming the new Word library but cant make sense of it.

any help is appreciated.

thanks,

G.Miller


do Visual Basic "Selection.MoveDown Unit:=wdLine, Count:=2"
do Visual Basic "Selection.TypeParagraph"
do Visual Basic "Selection.InsertDateTime DateTimeFormat:=\"MMMM d,
yyyy\", InsertAsField:= False"
do Visual Basic "Selection.TypeParagraph"
do Visual Basic "Selection.TypeParagraph"
do Visual Basic "ActiveDocument.Tables.Add Range:=Selection.Range,
NumRows:=1, NumColumns:=2, DefaultTableBehavior:=wdWord9TableBehavior,
AutoFitBehavior:=wdAutoFitFixed"
do Visual Basic "Selection.Tables(1).AutoFormat
Format:=wdTableFormatSimple1, ApplyBorders:=False,
ApplyShading:=False, ApplyFont:=False,
ApplyColor:=False,ApplyHeadingRows:=False, ApplyLastRow:=False,
ApplyFirstColumn:=False,ApplyLastColumn:=False, AutoFit:=False"
set contents of selection to mycontactaddress
do Visual Basic "Selection.MoveRight Unit:=wdCell"
do Visual Basic "Selection.ParagraphFormat.Alignment =
wdAlignParagraphRight"
set contents of selection to mycontactnumbers
do Visual Basic "Selection.MoveDown Unit:=wdLine, Count:=1"
do Visual Basic "Selection.TypeParagraph"
do Visual Basic "Selection.ParagraphFormat.Alignment =
wdAlignParagraphJustify"
set contents of selection to myestimatebody

 >> Stay informed about: Word 2008 Script 
Back to top
Login to vote
yello62

External


Since: Jun 13, 2008
Posts: 1



(Msg. 2) Posted: Fri Jun 13, 2008 6:52 am
Post subject: Re: Word 2008 Script [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I ran into a similar issue when I purchased a Mac Mini and installed
Office 2008. I had written a significant amount of Excel VBA stuff a
few years ago and was taken by surprise when there was no VBA in the
product.

I used the information on this site as a guide and was able to slog my
way through easily enough.

http://www.microsoft.com/mac/developers/default.mspx

Hope it helps,

Tony

 >> Stay informed about: Word 2008 Script 
Back to top
Login to vote
G.Miller

External


Since: Jun 13, 2008
Posts: 7



(Msg. 3) Posted: Fri Jun 13, 2008 10:54 am
Post subject: Re: Word 2008 Script [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> I used the information on this site as a guide and was able to slog my
> way through easily enough.
>
> http://www.microsoft.com/mac/developers/default.mspx
>

thanks tony, i'll give it a shot.

i know its really quite simple, but every time i try to write
applescripts i get bogged down by the details. i can never seem to
grasp the overall concepts of the language and all the classes,
containers, commands, elements, properties...
in college i took fortran programming and various fluid dynamics
engineering programming classes, to no avail i guess!
 >> Stay informed about: Word 2008 Script 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Script to convert word docs to text files - Hello, I have hundreds of word docs that I want to import into filemaker pro (the text of the docs). Filemaker has an import option that enables you to import text files, but not word documents. I cant seem to get it to work, any ideas? Is this the righ...

Scripting Excel - Avoid 2008 - I have two scripts I use in Excel regularly. One: Excel 2004 - 18 seconds Excel 2008 - 140 seconds Two: Excel 2004 - 55 seconds Excel 2008 - 334 seconds Bleah. -- Woodworking links and more at http://www.woodenwabbits.com -------------- I kill all..

Excel 2008: insert picture from file - Hello Scripters, had a real head scratcher here that I was hoping someone could help me with. I'm trying to script picture replacements in an Excel 2008 spreadsheet.The images ogitinal exist in the spreadsheet, and the replacements are sitting in a..

Help with script - What is the difference between these two scripts and why does the 1st one not work? Do I need to declare (or dim) variables at the beginning? ----- #1 tell application "FileMaker Pro7" tell layout "layout_name" set aVar to cell &...

Help with script, please - Here is the script: tell application "Mail" set foo to the selection set foo to item 1 of foo set address_ to address of item 1 of to recipient of foo if not (name of item 1 of to recipient of foo exists) then set AppleScript...
   Macintosh computer (Home) -> Apple Scripts All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]