How to react to Microsoft Word events?
My program runs Microsoft Word (setting "ws" = Word). I can issue commands to Word, but can I also react to Word events? I set ws to be "withevents" but that didn't seem to make wd's events available to my program.
Robert Homes
Hi Robert,
Based on the descrption, you want to subscribe the event for Word using VB.Net. Are you writing an Word automation application?
If I understood correctly, it is similar as use other event in VB.Net and here is an sample that add an document_Open event for the Word application for your reference:
Imports Word = Microsoft.Office.Interop.Word
Class TestWordEvent
Private WithEvents wordAppEvent As Word.Application
Public Sub NewDocument()
Dim wordApp As New Word.Application
wordAppEvent = wordApp
wordApp.Visible = True
wordApp.Documents.Open("C:\users\UserName\desktop\doc1.docx")
End Sub
Private Sub Document_Open(ByVal Doc As Word.Document) Handles wordAppEvent.DocumentOpen
MsgBox("")
End Sub
End Class
Also you can get more events about Word applicaiton from link below:
Application Events (Word)
Regards & Fei
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Similar Messages
-
How can I open Microsoft Word files on my iMac?
How can I open Microsoft Word files on my iMac?
You can even use the Pages app that is installed on your computer. Finally you can buy a license of Office for Mac and have Word, Excel, PowerPoint and if you want Outlook too.
-
how can I use microsoft word, power point and those apps in my new iMac ? i bought this iMac yesterday so am new on tho and i would like to know
If you absolutely must have the Microsoft applications, you can purchase and download them from http://microsoft.com/mac.
Free software suites LibreOffice and OpenOffice offer similar functionality (word processing and spreadsheets).
Or you could do worse than look at Apple's Pages, Numbers and Keynote, which should already be installed in your Mac and can export to Microsoft formats if need be.
Matt -
HT204394 how do i put microsoft word docs onto icloud
how do i put microsoft word docs onto icloud so that i can transfer to my mac book
Not really.
You can sign into iCloud.com from a web browser on your PC.
Open Pages and drag the Word document in or click the Gear on the top right and upload.
This will convert it to a Pages document. It will be accessible to you through iCloud and the Pages app on your iOS devices. You can always redownload the file from iCloud as a Word document.
As with any document conversion, this may alter the formatting. -
How can I get Microsoft Word in my MacBook Pro?
How can I get Microsoft Word on my MacBook Pro? I need it to submit work to my teachers.
Buy Office 2011 for OS X. Or if you don't want to spend any money you can use Libre Office.
-
How do I retain Microsoft Word hyperlinks (internal to the Word document) in pdf export? I lose them in process. Using Word 2011 (14.4.3) and Mavericks. Have tried importing to Pages 5.2 and exporting, but that does not work either.
If you don't get an answer here, search/ask in the forums devoted entirely to MS stuff by its maker. These forums are for the Apple app Pages.
http://answers.microsoft.com/en-us/mac/forum/macword -
How do you get Microsoft Word on my Mac?
How do you get Microsoft Word on my Mac?
Purchase the software from Microsoft: http://www.microsoft.com/mac/products
Depending on which version of OS X you have, you may be able to purchase Pages in the App Store for $20 instead. Pages is Apple's equivalent to Word.
~Lyssa -
How can i download microsoft word
how can i download microsoft word into my macbook air
... or here (if you are in the U.S.):
http://www.microsoftstore.com/store?SiteID=msusa&Locale=en_US&Action=DisplayProd uctSearchResultsPage&result=&keywords=office+compare
Kappy's link above now goes to Office 365, the subscription based verion of Office. Indeed that is newer than Office for Mac 2011, which is offered on the link I provided above. But Microsoft still sells either version. They are quite different in that you would own Office for Mac 2011, while Office 365 is subscription based, and can be used on more than one machine.
Sorry, never mind the above. Kappy's link provides both options. Sorry!
Message was edited by: sberman -
How do I download Microsoft word on a Macbook air?
How do I download Microsoft Word?
Have you purchased Microsoft Word yet? If so, download it from the media you purchased it from.
If you haven't purchased it yet, buy and download it from here:
http://www.microsoftstore.com
I don't know if you will be able to purchase Word without the rest of Office. -
How to I use Microsoft Word to create or edit documents on my ipad2?
I have a PC laptop, an ipad2 and iphone 4s. I would like to do school work on my ipad2. How to I create documents with microsoft word on my ipad? Or if I have an assignment saved as a word.doc on my pc, how can I edit it or save it on my ipad? Thanks!
Check out the free CloudOn app. http://itunes.apple.com/us/app/cloudon/id474025452?mt=8
Cheers, Tom -
how can i use microsoft office on my ipad? i can't also use flash to copy and transfer documents into it and neither could i use it with a projector for presentation.
You can't use MS Office on the iPad as Microsoft haven't made app versions of their programs (you can only use apps that are in the iTunes app store on your computer and the App Store app on the iPad), but there are apps that support word, excel and powerpoint documents. The options include Apple's Pages app for Word documents, Numbers for Excel spreadsheets and Keynote for Powerpoint. And from third-parties apps such as Documents To Go ('premium' version) and QuickOffice Pro HD.
As to how you then get the file to your chosen app will depend upon what the app supports - different apps will have different ways of copying their content to/from a computer e.g. via the file sharing section at the bottom of the device's apps tab when connected to your computer's iTunes, via wifi, email, dropbox etc -
How can I customize Microsoft Word Outline Numbered List Templates with AppleScript?
I wrote an applescript to set up a word document with the appropriate styles to give the document an academic setup, much like what Xelatex produces. This is a work in progress and I have a problem.
I have successfully applied the style changes to each Header and I have applied the desired outline numbered list template "list template 5 of list gallery 3", however I would like to add tab stops to each one in order to make each header look slick like in Latex.
To do what I want manually in Microsoft Word 2011 mac I would click Bullets and Numbering, customize, under text position i would check the tab stop box and put in some value (1 cm, for example)
The following is an approximation of the result of running this script on a document with headings 1-9 applied consequently to each line, respectively. Note how they are not even. I think this is an issue with the template, but I want to be able to run this script on any mac without extra template files.
1 Heading 1
1.1 Heading 2
1.1.1 Heading 3
1.1.1.1 Heading 4
1.1.1.1.1 Heading 5
1.1.1.1.1.1 Heading 6
1.1.1.1.1.1.1 Heading 7
1.1.1.1.1.1.1.1Heading 8
1.1.1.1.1.1.1.1.1 Heading 9
Here is the script so far:
Academic Paper Setup
Copyright © 2012 macmadness86
Just kidding there is no copyright. Open Source rules!
You may use this code however you like. It would be nice
if you made reference to the original code when sharing.
THINGS TO DO:
find a fix for changing font color of headings without hardcoding it.
fix headings 4-9
(*<Properties to be set by the user*)
--number suffix corresponds to heading 1, heading 2, etc.
--NOTE: To change the coloring of headings, it must be hardcoded. must find a fix.
property fontName1 : "CMU Serif Roman"
property fontName2 : "CMU Serif Roman"
property fontName3 : "CMU Serif Roman"
property fontName4 : "CMU Serif Roman"
property fontName5 : "CMU Serif Roman"
property fontName6 : "CMU Serif Roman"
property fontName7 : "CMU Serif Roman"
property fontName8 : "CMU Serif Roman"
property fontName9 : "CMU Serif Roman"
property fontSize1 : 15
property fontSize2 : 14
property fontSize3 : 13
property fontSize4 : 12
property fontSize5 : 12
property fontSize6 : 12
property fontSize7 : 12
property fontSize8 : 12
property fontSize9 : 12
property boldTF : true
property italicTF : false
property highlightTF : false
(*Properties to be set by the user>*)
tell application "Microsoft Word"
tell active document
(*<normal code BLOCK*)
set name of font object of Word style style normal to "CMU Serif Roman"
set font size of font object of Word style style normal to 12
set bold of font object of Word style style normal to false
set italic of font object of Word style style normal to false
set color index of font object of Word style style normal to black
(*normal code BLOCK>*)
(*<heading 1 code BLOCK*)
set name of font object of Word style style heading1 to fontName1
set font size of font object of Word style style heading1 to fontSize1
set bold of font object of Word style style heading1 to boldTF
set italic of font object of Word style style heading1 to italicTF
set color index of font object of Word style style heading1 to black
--set paragraph format left indent of paragraph format of Word style style heading1 to (centimeters to points centimeters 0) --indent sections relative to margin
--set tab stop position of tab stop of Word style style heading1 to (centimeters to points centimeters 1)
--set tab hanging indent of paragraph format of Word style style heading1 to count 1
(*heading 1 code BLOCK>*)
(*<heading 2 code BLOCK*)
set name of font object of Word style style heading2 to fontName2
set font size of font object of Word style style heading2 to fontSize2
set bold of font object of Word style style heading2 to boldTF
set italic of font object of Word style style heading2 to italicTF
set color index of font object of Word style style heading2 to black
(*heading 2 code BLOCK>*)
(*<heading 3 code BLOCK*)
set name of font object of Word style style heading3 to fontName3
set font size of font object of Word style style heading3 to fontSize3
set bold of font object of Word style style heading3 to boldTF
set italic of font object of Word style style heading3 to italicTF
set color index of font object of Word style style heading3 to black
(*heading 3 code BLOCK>*)
(*<heading 4 code BLOCK*)
set name of font object of Word style style heading4 to fontName4
set font size of font object of Word style style heading4 to fontSize4
set bold of font object of Word style style heading4 to boldTF
set italic of font object of Word style style heading4 to italicTF
set color index of font object of Word style style heading4 to black
(*heading 4 code BLOCK>*)
(*<heading 5 code BLOCK*)
set name of font object of Word style style heading5 to fontName5
set font size of font object of Word style style heading5 to fontSize5
set bold of font object of Word style style heading5 to boldTF
set italic of font object of Word style style heading5 to italicTF
set color index of font object of Word style style heading5 to black
(*heading 5 code BLOCK>*)
(*<heading 6 code BLOCK*)
set name of font object of Word style style heading6 to fontName6
set font size of font object of Word style style heading6 to fontSize6
set bold of font object of Word style style heading6 to boldTF
set italic of font object of Word style style heading6 to italicTF
set color index of font object of Word style style heading6 to black
(*heading 6 code BLOCK>*)
(*<heading 7 code BLOCK*)
set name of font object of Word style style heading7 to fontName7
set font size of font object of Word style style heading7 to fontSize7
set bold of font object of Word style style heading7 to boldTF
set italic of font object of Word style style heading7 to italicTF
set color index of font object of Word style style heading7 to black
(*heading 7 code BLOCK>*)
(*<heading 8 code BLOCK*)
set name of font object of Word style style heading8 to fontName8
set font size of font object of Word style style heading8 to fontSize8
set bold of font object of Word style style heading8 to boldTF
set italic of font object of Word style style heading8 to italicTF
set color index of font object of Word style style heading8 to black
(*heading 8 code BLOCK>*)
(*<heading 9 code BLOCK*)
set name of font object of Word style style heading9 to fontName9
set font size of font object of Word style style heading9 to fontSize9
set bold of font object of Word style style heading9 to boldTF
set italic of font object of Word style style heading9 to italicTF
set color index of font object of Word style style heading9 to black
(*heading 9 code BLOCK>*)
end tell
(*<apply numbering to the sections code BLOCK*)
set selFind to find object of selection --selects text of execute find command
clear formatting selFind --reset selFind just to make sure
set style of selFind to style heading1 --set style we are looking for
execute find selFind find text "" wrap find find continue with find format and match forward
if found of selFind is true then
--display dialog (get content of text object of selection) --for debugging only
(*<code BLOCK word__set paragraph style*)
--I apply the formatting to the previously found text
set myLT to list template 5 of list gallery 3 of active document
apply list format template (list format of text object of selection) ¬
list template myLT
end if
(*Apply numbering to the sections code BLOCK>*)
end tellI figured it out . Just in case anyone else wants to know the script is below:
tell application "Microsoft Word"
set myTable to table 1 of selection
convert to text myTable separator separate by tabs
end tell -
How can I convert a Microsoft Word 2004 file to Microsoft Word 2011? Most of the time the prompt says that the old Word is not supported anymore.
Go to the Microsoft web site and download it.
http://www.microsoftstore.com/store/msusa/en_US/list/ThemeID.33363200/categoryID .62686000?tid=s6YOr2uG5_dc&cid=5250&pcrid=22408403093&WT.srch=1&WT.mc_id=pointit sem_Microsoft+US_google_5+-+OMac+2011&WT.source=google&WT.medium=cpc
Microsoft Word 2004 will not run on OSX 7.5 or later. You might as well delete it.
Ciao. -
How do I open a Microsoft Word cocument in a Email since I upgraded to Maverick. Maverick does not recognize MS Word, Excel and Power Point.
MS Office 2008 and 2011 work fine in Mavericks. What version are you using? You can always use a program such as Open Office to open the docs.
Pete -
How to delete unwanted microsoft word files...PLEASE!
I would love to know how to delete files in microsoft word that are saved under my documents. The only way I can delete a saved word documsnet is when it has ONLY been saved to the desktop, then I drag it to the trash. When it has been saved to my documents or on the harddrive anywhere, there is no way I can find to delete it. And since I want to clean up my word documents I need to delete the files I no longer use.
Does anyone know how to do this?
I know microsoft word is not an "apple software" but it did come on my mac, and when I had a PC (a compaq) it was easy to delete fiels I no longer used. So I thoguht the best way to get an answer for this would be to contact apple support.
Please someone answer, I have been trying to find this answer for months! Thanks!Late post for the archives--another fix:
I'm guessing the problem is trying to use File | Open to bring up a window that shows files, and delete from there. This works in Windows, but not on the Mac (true for any program, not just Word).
On the Mac, you have to delete files from within the Finder (the equivalent of Windows Explorer). Go to the desktop and hit apple-N (cmd-N) to bring up a Finder window. Set it to Column View. Now you can browse to any location on your harddrive and drag a file to the trash.
Maybe you are looking for
-
My ipad2 has crashed. Tried to do an update last night. Upload bar moved 1cm then locked stayed like that all night. I have switched off and then on again and its prompting me to connect to itunes. Once connected it says to restore. It starts this pr
-
Use iMac as monitor for a PC laptop
Can i use my iMac (2009) as a monitor for a Windows 7 Laptop?
-
TIFF or JPG to PNG or RAW (Automator) Utility?
I am coming from PC and see that I am still having issues with somewhat reflexively exporting images from Aperture (for upload to an ftp site or for other reasons for instance) - and I see that I now have images both on my desktop and in my Documents
-
Hi all i working in a report i am getting output for a field like this <b>.4600</b> after some necessary calculations. but while showing output i have to show it like this. .<b>46</b>. can any one tel me how to change it. Thank
-
Need confirmation on Import Batch to TCA Registry
Hi Team, On one of the instance the Import Batch to TCA Registry is getting succeeded and on other instance the same concurrent request is getting failed with ORA-01400 :cannot insert NULL INTO. Where the both instances are same where i have cloned f