Over 1 million tech questions and answers.

Running macro automatically on document open (Word 2007)

Q: Running macro automatically on document open (Word 2007)

I am trying to get Word 2007 to hide my unused status bar, but unfortunately there does not seem to be an interface toggle for this in the 2007 version. I then tried to copy and paste a macro for this, which worked, but only when I manually ran it each time I opened a document. Is there a way I can set it to run automatically alongside another macro I have running when a document opens?

I know nothing about macro language...I just copied and pasted the code. So being as descriptive as possible with your solution would help me.

Thanks!
Here's the code (which currently works) for automatically adjusting the zoom on my documents:

Public Sub AutoOpen()
ActiveWindow.ActivePane.View.Zoom.Percentage = 100
End Sub
Here's the code for hiding the status bar that I want to also run automatically whenever I open a document:

Application.CommandBars("Status Bar").Visible = False

RELEVANCY SCORE 200
Preferred Solution: Running macro automatically on document open (Word 2007)

I recommend downloading and running Reimage. It's a computer repair tool that has been proven to identify and fix many Windows problems with a high level of success.

I've used it in the past to identify and fix everything from blue screens (BSOD's), ActiveX errors, corrupt files and processes, dll/exe/sys errors, recover lost memory, Windows update problems, defragging, malware removal etc.

You can download it direct from this link http://downloadreimage.com/download.php. (This link will automatically start a download of Reimage that you can save to your computer.)

A: Running macro automatically on document open (Word 2007)

Read other 16 answers
RELEVANCY SCORE 107.6

When I open any Word 2007 document (in this case one entitled ?Word 2007 test document?), I am greeted with the following:

attached image VB01

When I click on [OK] I get:

attached image VB02



When I click [X] to close, I get:

attached image VB03


When I click on [OK], I finally get my document:

attached image VB04


This has occurred since I setup the "Normal" Template to have the filename placed in a page's Footer.

Can anyone offer any advice, please?

Read other answers
RELEVANCY SCORE 92.8

Hello,

I'm new to this and word 2007, so please be patient with me.

i need a bit of help. I've got approx 200 word documents (template.rtf documents) that are unique to our system and i have to back them up (in case they are changed/amended or deleted by users, and also so that we can look at these and decide where we can condense them i.e. similar letters into one document etc).
Anyhow I have managed to copy these over into a folder but the problem I have is that the name of the document is not on the actual document so when these are printed out an passed over to a third party to look at and change it looks like i am going to have to write the name of the document onto each one.

Is there a way of automatically inserting the name of document into the actual document (the footer maybe) without having to open them up?

thanks
 

A:Automatically insert the document name - word 2007

Read other 6 answers
RELEVANCY SCORE 92.4

Hello all!
The macro has to do the following:Find the next word in the document that ends with "##"
Highlight that word and the following bullet in red.
Find the next word in the document that ends with "##"
Highlight that word and the following bullet in blue.
Repeat until end of document alternating between those two colors.
​Here is an example of how the end result should look like:

Another day.
house##
Hello all. Blah blah blah blah.

Goodbye all.
window##
Yes sir.
No sir.
apple##
Open book.
Close book.

Thanks for any help you can give me,
Pete

 

A:Macro that highlights specific parts of a document in MS Word 2007

Have you tried recording a macro?
Start macro recorder and then do what you want.

After you finished one then stop recording, open the macro to edit and see how it works.

Most of us 'geniuses' started that way and it gives insight to what really happens.
If your're having trouble just post a sample document, Okay?
 

Read other 2 answers
RELEVANCY SCORE 91.6

How do I edit the macros of a document if the macro that closes the program is executing right when the document opens? It doesn't allow me enough time to go to View --> View Macros to delete or edit the auto-exec macro.
 

A:Solved: Word 2007 auto-exec macro closing document

If you open a brand new document without any macros attached you should be able to change the application security level to high so that no macros will run which will then allow you to open the document with the code attached to edit it.

Rollin
 

Read other 2 answers
RELEVANCY SCORE 90.8

I have a very simple Word 2007 macro-enabled template that has a single ActiveX checkbox control and a simple one-line Document_New macro. When this .dotm file is stored in a network folder that has been setup in Word 2007 to be a trusted location, Word always aborts when creating a new file based on this template.

If the ActiveX control is removed, or the macro code is removed, or the file is placed in a non-trusted location (and you select the option to enable macros when you get the security banner warning), it functions just fine. It's just the combination of ActiveX, macro code in a trusted location that causes the crash. I can e-mail the file for those that want to check it out.

Anyone got any ideas how to correct this strange one?

BTW, I have Office 2007 SP2.

Thanks!
 

A:Word 2007 aborts creating new document with macro-enabled template with ActiveX

This is a known issue with Word 2007 after installing another one of their hot-fixes (KB2251419). They applied a hot-fix (KB2449499) for it in October 2010

Here's a link:
http://support.microsoft.com/kb/2449499

I just figured this one out as well and was having the same issue.
 

Read other 2 answers
RELEVANCY SCORE 90

Using Excel 2000, I want to write a macro that opens a specific word doc. I can manage in VB to open a blank word doc...but what is the command for a specific document?

thanks
 

A:Excel 2000: Macro to Open Specified Word Document

Sub OpenWordDoc()

Dim AppWord As Object
Set AppWord = CreateObject("Word.Application")
AppWord.Visible = True
AppWord.Documents.Open Filename:="c:\path\filename.doc"

End Sub
 

Read other 1 answers
RELEVANCY SCORE 89.2

As above.

Is there a software upgrade i need to do.

I have the password. comes up with...

"Word experienced an error while trying to open this file"

Thanks in advance

K
 

A:Solved: Can't open password protected Word 2007 document in Word 2003

Read other 6 answers
RELEVANCY SCORE 87.2

I am working in Excel and would like to open, print, and then close an embedded Word document with a button.

Can anyone help?

Thanks for your time!
 

A:Solved: Excel Macro to Open, Print, and Close an Embedded Word Document?

Read other 16 answers
RELEVANCY SCORE 85.2

I have written a macro to insert multiple JPEGs into a word 2007 document, resize them, position them on the page and then alter the page orientation and size accordingly.

The macro runs fine and completes the task but once it is finished the ribbon freezes and nothing can be selected. I can move through the document and edit pages but cannot acces the ribbon at all.

Exiting the document, saving and reopening the ribbon returns and the document seems uaffected?
It seems that the macro is not finishing properly or something?

Would appreciate assistance with this problem.

here is the VBA macro code...

Sub AddMuliplePictures()
'Declare a variable as a FileDialog object.
Dim fd As FileDialog
Dim num As String

Dim i As Integer
i = 0
'Create a FileDialog object as a File Picker dialog box.
Set fd = Application.FileDialog(msoFileDialogFilePicker)
'Declare a variable to contain the path
'of each selected item. Even though the path is a String,
'the variable must be a Variant because For Each...Next
'routines only work with Variants and Objects.
Dim vrtSelectedItem As Variant
'Use a With...End With block to reference the FileDialog object.
With fd
'Add a filter that includes GIF and JPEG images and make it the second item in the list.
.Filters.Add "Images", "*.gif; *.jpg; *.jpeg"
'Sets the initial file filter to number 2.
.FilterIndex = 2
'Use the Show method to display the File Picker dialog box a... Read more

A:Running my word 2007 macro freeze the ribbon

Have narrowed down the error to these lines:

For Each nShape In ActiveDocument.Shapes
nShape.RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
nShape.Left = 0
nShape.RelativeVerticalPosition = wdRelativeVerticalPositionPage
nShape.Top = 0
Next nShape

Any clever suggestions for alternatives? have tried...

Set myRange = ActiveDocument.Range
myRange.ShapeRange.Select
Set myShapeRange = Selection.ShapeRange
myShapeRange.Align msoAlignLefts, True
myShapeRange.Align msoAlignTops, True

but so far getting a timeout error?
 

Read other 1 answers
RELEVANCY SCORE 85.2

I have found that when I run word 2007 or any other office 2007 program and go to the open a file icon, you then get the open file window that has all of my word documents. Since I saved them with thumbnails, there is a thumbnail of each document saved. Now here comes the problem; over on the right there is the preview pane and when you click on a file for preview, I get the error message: "This file can't be previewed because of an error in the Microsoft Office Word previewer". Of course I have googled this problem, but I haven't found much info other that to run the program with the /a on the end of the desktop short cut which turns off many of Words add-ins and other things that I really don't know about. Yes when you run it in this mode, the preview handler does work as it should. Does know the cause of this behavior and have a solution?

A:Office 2007 Open Word Document Window

Since running the program with the /a locks out plug-ins and such, I should of known that a plug-in was causing the problem. I disabled Adobe plug-in and it now works. How about that.

Read other 2 answers
RELEVANCY SCORE 85.2

I have an Acer Aspire 4740G laptop, running MS Windows 7 Home Premium 64-bit, with Intel Core i5 CPU M 430 @ 2.27 GHz, and 2 GB RAM. I have AVG Antivirus Free Edition 2014 installed.

I have many problems and get error messages when I try to open a MS Word document or try to get MS Word program to open.

Problem #1 and Error message #1:

I cannot get past the first orange screen that says "Microsoft Word 2007". It hangs indefinitely. Error message: "There was a problem sending the command to the program."

Problem #2:

I tried to open a MS Word document with LibreOffice. It opened the first MS Word document but hanged indefinitely when I tried to open another MS Word document.

Problem #3:

I tried opening a MS Word document using MS Publisher; it had problems and hanged indefinitely.

Problem #4 and Error message #2:

I tried to create a document in MS Publisher using MS Word features (import) but it gave an error message: "Microsoft Office Publisher is connecting to printer Microsoft XPS Document Writer to get print capabilities and settings information." This hanged indefinitely.

Problem #5:

After I had imported MS Word features into MS Publisher, when I tried to use MS Publisher itself, the pull-down menus were all empty. Why were they empty? What happened there? It never happened before.

Problem #6:

I searched Windword.exe using Start > and I typed this in the Search box:

"C:\Program Files\Microsoft Office\Office12\winword.exe&... Read more

A:I can't open Microsoft Word 2007 program and document

Hi Faridah, Welcome to Seven forums.

Lot of errors there.

Try this for starters. Fix MS Word.

Also, try to run MS Word after unchecking the option "Run as Administrator".

Read other 3 answers
RELEVANCY SCORE 85.2

Hi,

I need help with word 2007. When I open my document (.doc format), word automatically reformats it during loading. After this, I see a lots of garbage in the contents list. This garbage are in fact lines from my document. In the document they look just like other text, but they appear in the list. When I update the style of these lines (for example it uses normal and I just click on normal style), they disappears from the list. I save the document but next time word reformats it again and I have the exactly the same garbage in the contents list. I realized I can stop the formmating during document open by ESC, which at least does not corrupt the document again, but how do I repair the document permanently?

What is wrong with my document? How do I repair my document?
 

Read other answers
RELEVANCY SCORE 77.6

When saving a Word 2007 document as a webpage (htm, html), an extra folder is automatically created besides the hmtl document itself. This folder contains background information like pictures, wallpaper etc. Is there a way to prevent that folder from being created in the first place? I've got Word 2000 on another computer, and when I save my word documents as html files over there, that extra folder is not generated. The only time that folder is created in 2000 is if my documents contain pictures, wallpaper etc. In Word 2007, it is created all the time, even though my documents are just plain text.
 

A:Solved: Word 2007, saving document as html document: how to get rid of extra folder?

Managed to find the solution, it was very simple after all. One has to save the document as a filtered webpage and click "yes" when a box pops up warning you that you will use certain featuers which are specific to Office2007, such as the background. Then the document will save without that extra folder and files.
 

Read other 1 answers
RELEVANCY SCORE 77.2

I have two questions regarding documents created in Word 2007...

1) Can links be created within a Word document? For example, can I click on and item my table of contents and have the document jump to that particular section of the document?

2) Also, is there a way to make sections of the document hidden until the user clicks a specific word or graphic in the document?

I'd like to specify a particular instruction and include a "Show example" link that would make a detailed example appear for those who needed the extra help.

Thanks everyone!

A:Word 2007 - Links within a document? Hide/Show sections of a document?

If you created table of contents through References - Table of Contents, you can hold Ctrl and click on the item in that table, word will take you there. This feature is standard.

Also, to navigate inside document you can use bookmark option.
Insert bookmarks. Word 2010 Bookmarks
Then insert Hyperlink - in the window select second tab "Place in This Document" and choose your bookmark.

As for hiding parts of document, I do not think that is possible.
You can create that in HTML document with javascript, but not in Word document.

Read other 3 answers
RELEVANCY SCORE 76.4

Hello All,

I manage the maintenance on a corporate jet. I have a Dell Inspiron 6400 laptop running Vista. We use Microsoft Word 2007 for our maintenance log book, oldest maintenance entries to newest. I want WORD to open my logbook document on the last page of the document when I fire it up, not the first. Any ideas? My email address is [email protected].

Thanks, Greg Stultz
 

A:How can I get Word 2007 to open on the last page of a multi-page document?

The only way I know how to do this is using a macro. Open the document and press ALT + F11 to open the VBA editor. In the project explorer window on the left you will need to right click the object labeled "ThisDocument" and choose "View Code"

Paste the code below into the blank code window and save the document. You will need to adjust the macro security level to medium or low from the main Word window by clicking TOOLS --> MACRO --> SECURITY
Code:
Private Sub Document_Open()

Selection.EndKey Unit:=wdStory

End Sub
You can also accomplish the same action without using a macro by opening the document and clicking CTRL + END to take you to the last page.

Regards,
Rollin
 

Read other 1 answers
RELEVANCY SCORE 74

I am running XP and Word 2000 and Nortons. Word will crash if you leave the document open for a while (there is no specific time frame) and then select close (icon). The error - Microsoft Word for Windows has encountered a problem and needs to close. The details are: AppName: winword.exe
appver 9.0.0.3822
Modname: kernel32.dll
modvers: 5.1.26002180
offset 0001eb33

This has pretty much happened since I got this laptop. I have reformatted and reinstalled everything (due to another problem) and still have the same problem with word. I have used the same CD on other computers to install word and they do not have the same problem.

I use a variety of templates and plain documents in my work and can not pin point it to one template.

If you leave Word open with a document (no matter what size) and come back to it later this is when the problem happens. I started to get around it my saving first then closing, but this no longer works. The save completes and then I select Close and this is when it happens - you get the dreaded pause and then you hear the whirl of the computer and then you get the Microsoft Word for Windows has encountered a problem and needs to close. Firstly I could put up with it but is now just a nusiance.
 

Read other answers
RELEVANCY SCORE 74

Hi. Need help on this. I'm trying to loop this macro until end of document, or until no auto 'work' text is found. Macro should search all 'work' texts and extends it until the next ), then mark them red, then repeat until end of document.

Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorAutomatic
With Selection.Find
.Text = "work"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindAsk
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection
.StartIsActive = False
.Extend Character:=")"
End With
Selection.Font.Color = wdColorRed

Also, can .Extend Character:=")" have a condition too? Like, execute only if ) is auto. I noticed that it will extend even if ) is already marked red.

Thanks!
 

Read other answers
RELEVANCY SCORE 74

I have a requirements document that i want to convert into a table. The document uses word headings (down to level 10) and in general looks like this

1. Requirements
1.1 Physical
The box shall be less than 1m square
The box shall be brown
The box shall be cardboard

1.2 Electrical
The box shall plug into a wall

What i want ideally is a table that has three columns

col 1 = heading number
col 2 = heading text
col 3 = att text after the heading and before the next heading

I'm pretty new at VB and wasn't able to figure it out. Any help or example code that someone has would be really great

Thanks

Read other answers
RELEVANCY SCORE 74

I have various search and replace macros in Word. I want to stop the macro action on each macro when the macro reaches the end of the pages processed. Pages processed vary in number between one document and another. How do I stop the macro from executing the search and replace function at the bottom of each document?
 

A:How Do I Stop A Word Macro At The End Of Each Document

Read other 11 answers
RELEVANCY SCORE 74

I know this must be simple, but I just can't figure it out at the moment!
I've got a macro in Word 97, written in VBA, and I want it to run when the document is saved (when user selects File/Save or File/SaveAs)

I'm sure i've seen it done (I might have even done it myself in the past in Word 6 !!!!)

Cheers
Mike
 

A:Run Word 97 Macro when saving document

Read other 7 answers
RELEVANCY SCORE 74

Hi, I'm stumped on trying to split a word document into multiple single files. I tried using the below code but it kept stopping at the "save as" part. Each page has a page break, starts with the word "Dear" and ends with the word "Mike." This was a result of a mail merge so I have close to 1000 single pages in one word document that i need to split and save into individual files, ideally as "[Name of Letter Recipient] - Letter". I know there are downloadable add-ons out there but I am not permitted to download anything as I am working on a work computer so macro is my best bet. Please let me know where the issue is....could it be that the "save as" is incorrect or is there a deeper program here?
Sub BreakOnPage(
' Used to set criteria for moving through the document by page.
Application.Browser.Target = wdBrowsePage

For i = 1 To ActiveDocument.BuiltInDocumentProperties("Number of Pages")

'Select and copy the text to the clipboard
ActiveDocument.Bookmarks("\page").Range.Copy

' Open new document to paste the content of the clipboard into.
Documents.Add
Selection.Paste
' Removes the break that is copied at the end of the page, if any.
Selection.TypeBackspace
ChangeFileOpenDirectory "C:\"
DocNum = DocNum + 1
ActiveDocument.SaveAs FileName:="test_" & DocNum & ".doc"
ActiveDocument.Close

' Move the selection to the next page in the documen... Read more

Read other answers
RELEVANCY SCORE 73.2

Hello,

can you please explain me how to stop whatever loop at the end of the document, in Word (2007) ?

In detail, what i want to do is to loop this code, until the end of document/file:
Code:
Sub RemoveLines()


Selection.Find.ClearFormatting
Selection.Find.Font.Underline = wdUnderlineNone
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "[0-9] .*^13"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With

Selection.Find.Execute
Selection.Extend

'MsgBox "first"

Selection.Find.ClearFormatting
With Selection.Find
.Text = "[0-9] .*^13"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
'MsgBox "2nd"

Selection.MoveUp Unit:=wdLine, Count:=1, Extend:=wdExtend
Selection.EndKey Unit:=wdLine, Extend:=wdExtend


Selection.Delete

End Sub

the document contains several numbered lists like this

1) question 1?
1 . answer 1
2 . answer 2
3 ... Read more

A:[Word Macro] Stop loop at End of Document ??

any help please ???
 

Read other 1 answers
RELEVANCY SCORE 73.2

Hi,

I work at a small non-profit and we have updated two computers with new computers running Windows 7. We use MS Word 2003. I have checked all threads on forum related to this issue, but nothing seems to correct our problem. I would be grateful for any help.

Description of issue: With a Word document open, one should be able to click "File" > "Send To" > Mail Recipient As Attachment", or any of the other mail options, and have the email composition window of Thunderbird pop up. What happens is that Word is attempting to send the attachment via Windows Live Mail. The computer basically freezes. If you try and abort or get out of Word, and error pops up stating you can't close Word until the email has been sent. Finally, you have to force a shut down of the computer.

Internet Explorer shows Thunderbird as default email client. I have check all of the other obvious places for setting the default email client, but I can't seem to find a conflict anywhere on the computer showing Windows Live Email as default client.

As a side note, this employee was using Outlook Express as their email client prior to the computer upgrade and all setting were imported into Windows Live Mail, which was initially used. The employee did not like Windows Live Mail, so I installed Thunderbird. It is used as the default email client and the only issue has been with Word. Additionally, I know that the document could be sent from Windows Explorer by right-cli... Read more

A:Can't send Word Document via Thunderbird from open document

Might try uninstalling Word, then reinstalling it.
 

Read other 1 answers
RELEVANCY SCORE 72.8

How do you keep a macro running until you reach the end of a page? Currently I just hold down the control or Alt keys. I have long documents so holding down the Alt + whatever key is not always practical.

Here is a sample macro. How do I make the macro run until the macro reaches (in this case) the top of the page?

I think the "do until" feature is used in the code but I do not know the syntax for "do until".

Code:
Sub DelimitBoldSentenceOnRightWithATab()
Selection.Find.ClearFormatting
Selection.Find.Font.Bold = True
With Selection.Find
.Text = "*"
.Replacement.Text = ""
.Forward = False
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = True
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.TypeText Text:=vbTab & vbTab
Selection.MoveUp Unit:=wdParagraph, Count:=1, Extend:=wdExtend
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText Text:=vbTab & vbTab
Selection.MoveLeft Unit:=wdCharacter, Count:=3
Selection.Find.ClearFormatting

End Sub

Thank you in advance for your replies.
 

A:Word Macro: How to keep macro running until end of page is reached

You can evaluate the current page number using the following property:

Selection.Information(wdActiveEndPageNumber)

Just use a loop and have it execute while Selection.Information(wdActiveEndPageNumber) = 1

Can you post your sample document?
Regards,
Rollin
 

Read other 2 answers
RELEVANCY SCORE 72.4

Hi,
Don't mind the curious ones, but I'm one of them. So anyway, almost one year ago now, the Word macro virus W97M/Marker.C was running rampant around Gordon College, with many teachers and students alike being infected. I was even infected with it thanks to one of my professors posting an assignment description document that had it. I was running AVG 9.0 at the time, and it was flagged many a time over. I think there were like six or so instances. My memory may be flaky, as my laptop has undergone many reformats since then, but what I do remember is trying to ignore AVG's warning, due to the fact that AVG has given me many false positives when I used it. The message Word gave me was that the document couldn't be opened because it wasn't available. But the strange part of that is that AVG had not removed anything from the file. I can think of two reasons why the file wouldn't run with the virus in it. Tell me which, if either, is correct. One is that Microsoft has since changed the macro format from 2003 and earlier versions of Word simply due to the many viruses that once existed for it, or two, that message was a very convoluted way of telling me that Windows 7 no longer supports Virtual device Drivers (*.vxd) as I was able to open the file after it had been cleaned up by Eset NOD32. Any knowledge you folks have would be very interesting, as I have always been curious about the very odd weekend of February 12, 2010. Now don't get me ... Read more

A:random curiosity about MS Word macro viruses and why (thank the Lord), they don't work in Word 2007/2010

I don't know the particulars of the macro virus you mention, but with Microsoft Office 2003, a significant change was implemented that effectively stopped the propagation of macro viruses.

Prior to Office 2003, macros were enabled by default, and opening a document with macros and auto-execute meant the macros were automatically executed (and thus the virus could infect and propagate).

With Office 2003, macro security was introduced. With a Microsoft Office 2003 default install, macros need to be signed with a certificate issued by a trusted root CA. Macros that are not signed will not be executed. Users have to explicitly lower the macro security level for unsigned macros to execute. Almost all macro viruses were unsigned.

Read other 3 answers
RELEVANCY SCORE 72.4

Hi,

Could anyone help: I have hundreds of .doc files that all begin with similar text, exactly 102 lines that I need to delete from the beginning of each file. Is there a macro that could do this?

Thanks!
 

A:Word macro: Delete 102 lines from beginning of document

I don't do Word macros but ... did you try recording something yourself?

I did, and got:

Selection.HomeKey Unit:=wdStory
Selection.MoveDown Unit:=wdLine, Count:=4, Extend:=wdExtend
Selection.Cut

Obviously that's for just the first 4 lines. And the next thing will be where the docs are all stored. (?)

ETA: here's a possible starter for "loop through all docs in a folder" http://support.microsoft.com/kb/306346
 

Read other 3 answers
RELEVANCY SCORE 72.4

Hello, would you please assist me in solving this problem: I have an Excel object (Excel.Sheet.1) in MS Word document. I'm trying to write a Visual Basic macro for MS Word to change the data in cell A1 of this table. How can I access the cell? I can only activate the table for example like this: ActiveDocument.Fields(1).OLEFormat.Activate - this leads to the same result as double clicking on the table object...

I know how to access MS Word tables, but the problem here is that I have to work with an Excel table.. I suppose only an Excel macro can access it and modify it... And if I write an excel macro to do so, how can I call it from my MS word macro script? Does solving of this problem involve OLE, DDE...? Maybe I should run the Excel application to modify the table and then close it.. so far I have no success in doing that.. this has to be implemented in a single MS word macro.

Thank you!
 

A:Accessing excel worksheets in a word document (VB macro).

Read other 9 answers
RELEVANCY SCORE 72

I am currently studying and I use online training, all my documents are given to me in PDF but they are editable. I have saved these as I complete them but now this computer is changing these PDF documents and automatically converting to word, when this occurs it is removing all my data I had in there. How do i stop this and get my editable info back the way it was please?

Regards
Tech Support Guy System Info Utility version 1.0.0.4
OS Version: Microsoft Windows 10 Home, 64 bit
Processor: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz, Intel64 Family 6 Model 142 Stepping 9
Processor Count: 4
RAM: 8031 Mb
Graphics Card: Intel(R) HD Graphics 620, 1024 Mb
Hard Drives: C: 222 GB (163 GB Free); D: 15 GB (1 GB Free);
Motherboard: HP, 81A9
Antivirus: Windows Defender, Disabled
 

Read other answers
RELEVANCY SCORE 72

Hello,

I need to watermark every Microsoft Word 2003 document I open. The watermark consists of a image, inserted in the Header of each page. I have recorded a Macro for this, and added a button on the toolbar, it works just fine when I click on it.

Is there a way to auto run this macro, so that each time I open a Word document this watermark appears?
So I don't have to click on the macro button.

I've tried to renamed it to AutoExec and I get errors when I open Word:

"RUN TIME ERROR '4248' THIS COMMAND IS NOT AVAILABLE BECAUSE NO DOCUMENT IS OPEN"

I press the debug button to check out the error in code, and the following line is highlighted:
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
The code of the macro looks like this:
Sub AutoExec()
'
' AutoExec Macro
' Macro recorded 3/30/2011 by PC
'
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.InlineShapes.AddPicture FileName:= _
"C:\Documents and Settings\test\Desktop\mark.jpg", LinkToFile:=False, _
SaveWithDocument:=True
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub
If anyone has any idea I'd appreciate it.
Thank you.
Andrei.
 

A:Autorun Macro on document open.

Read other 6 answers
RELEVANCY SCORE 71.6

My employer just upgraded to Microsoft Office 2007. According to the help files, I should be able to paste Excel charts into Word that update automatically when changes are made to either version.

I am clicking "Link to Excel data" and "Keep source formatting" when using the little popup clipboard to paste a chart into Word. But after closing both files, opening Excel and updating data on the chart, saving and closing Excel and re-opening Word, the chart is not updating with the new information. I can't get it to update by clicking on "refresh data" either.

Does anyone know how this is supposed to work? I was looking forward to being able to update just the Excel file and having it update in all the Word documents where it is pasted.

Our OS is Windows XP Professional, Version 2002, Service Pack 2. My work computer has a Pentium 4, 3 GHz processor and 2 GB of RAM.
 

Read other answers
RELEVANCY SCORE 71.6

Hi,
I have problem, when I put link to .XPS document in MS word document, i can't open this link, nothing hapens , links to other file types works fine. XPS document opens without problem with IE when opening file from folder. I tried to lower security setings in IE hidden security zone "my computer" , but this wont help. There is no problem in Windows 7 with xps links. But i need it to work in Vista. I think it's some kind of security problems. Any ideas ?

Vindows Vista32 SP2
MS Office 2007 SP2

A:Can't open .XPS document link from word document

Will this be any help:http://www.microsoft.com/whdc/xps/viewxps.mspx

Read other 2 answers
RELEVANCY SCORE 71.6

I am using Excel 2003 to create a database of hyperlinks to different paragraphs and then through the use of a macro I can create word documents. I inherited this macro from a different department and want to customize it for my needs. That being said I have no idea how to edit a macro this large and complex. What's the best way for me to post the macro and my questions, through email, message through this site, post it in this window? The macro is about 15 pages in length. Thanks.
 

A:Excel 2003 - Macro for creating word document question

First, welcome to the forum!!!

The best way for one of the Excel gurus to work on your problem would be to post your file, after you have removed any confidential data (make a copy and do the editing in it). If it is too large, zip it first (and zip is preferred to rar).
If you are unable to post the file (there seems to be a problem at times with people who don't have very many posts being able to attach files) just send me an email via my profile (include the URL link to this thread). I will respond to you and then you can send it to me, after which I will post it for you.
 

Read other 1 answers
RELEVANCY SCORE 70.8

I need a macro that finds a specific word in a text and highlights it. For example, I would like to find a word "computer" in some text and make all words "computer" in red color. Can anybody help me to create such macro for Ms Word?
 

A:Solved: Macro that finds and highlights specific words in MS Word document

Read other 7 answers
RELEVANCY SCORE 70.8

Hello all,

On the 12th October I was editing a Word 2007 document on my Vista Home laptop. Throughout editing I pressed Ctrl S to save the doc over the previous version. I copied data in from several other files.
I went back yesterday to edit the document again and it has disappeared. The only version of the doc is a previous version dated 21st Sept.
I searched on all files modified after 11th Oct just in case I had saved it under another name. Not in there. The files I copied data from did come up in the search results though, soi knwo the search function is working.
I checked the default Autosave location - not in there.
I checked the recycle bin - the doc is not in there and neither are any ~ files or autosaved files. I haven't emptied my recycle bin for months.
I cannot find a word doc modified afetr the 11th October.

Can it really just have disappeared? It is my MBA dissertation paper and I worked on this edit for an awful lot of hours.

Many thanks.

A:Word document disappeared: Word 2007

Welcome Suzanne

I am a lot older than you, but I still remember those term papers and finals. I will dow everything that I can to help

Start with this
DiskDigger | The trusted data recovery solution

Read other 1 answers
RELEVANCY SCORE 70.8

Windows 2000
Office 2000
If I Step into Excel Macro below, I get to MS Word and it stops there. I have to go back to Excel Macro and then Step into Word Macro (ReplaceData).. it then executes correctly and rest of Excel Macro works ok as well. If I try to Run the Excel Macro it gives me an Error in Word Macro (ReplaceData). Should I be waiting for Word application to start/finish and or set the focus back to my Excel Macro? The Application.Run ("Step2_Create_GA710_Prn") is an Excel Macro and it runs ok ,but once again think I have to wait for Word Macro (ReplaceData) to complete before starting that Macro.

Thanks to all that can help.. I am a newbie and enjoy the site and other posts. Ralph

Sub Step1_Extract_Ga710_Data()
' Step1_Extract_Ga710_Data Macro
' Macro recorded 3/22/2005 by DANMIS8
'

Workbooks.Open Filename:= _
"C:\Documents and Settings\DANMIS8\My Documents\Ga710\Base.Wk4"

Range("A8").Select

Range(ActiveCell, ActiveCell.End(xlDown)).Select
Range("A8:N8", ActiveCell.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Copy

Set wordobj = CreateObject("Word.Application")
Application.ActivateMicrosoftApp xlMicrosoftWord
wordobj.Application.Run ("ReplaceData")
Application.Run ("Step2_Create_GA710_Prn")
Application.Quit

End Sub

Here is my Word Macro Below..
Sub ReplaceData()
'Kill "C:\Documents and Settings\DA... Read more

Read other answers
RELEVANCY SCORE 69.2

I would like to create a macro that pastes unformatted text. I created a macro, but it just Pastes and ignores the selection of Special > Unformatted that I tried to get when I created it by recording the steps. Here's the macro now:

This is what I have:
----------------------------------------
Sub InsertPlainTxt()
'
' InsertPlainTxt Macro
' Insert plain text
'
Selection.PasteAndFormat (wdPasteDefault)
End Sub
----------------------------------------
I'm using Word 2007 on Vista operating system. If I edit this, what is the correct syntax?

Thanks.
 

A:Word 2007 Macro help

Sub InsertPlainTxt()
'
' InsertPlainTxt Macro
' Insert plain text
'
Selection.PasteSpecial Link:=False, DataType:=wdPasteText, _
Placement:=wdInLine, DisplayAsIcon:=False
End Sub
Script is from other internet msw help page.
 

Read other 2 answers
RELEVANCY SCORE 69.2

I need to create a macro that will save a specific document to a specific folder (same folder every time). The macro must include a pause so I can type in the name of the document because it will be different each time.
Thanks
 

Read other answers
RELEVANCY SCORE 69.2

Hello

In word 2003 (and all other editions) i have always had a macro that runs when i press Ctrl +D, what it does is creates a header, puts my name and the date in it, then closes the header, ready for me to type. However i have just recorded this in word 2007 and i get a debug error "run time error 5941"

If i hit Debug this is what i get.....

Macro2 Macro
'
'
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
ActiveDocument.AttachedTemplate.BuildingBlockEntries(" Blank").Insert _
Where:=Selection.Range, RichText:=True Selection.TypeText Text:="Daniel Davey 13NB" & vbTab & vbTab
Selection.InsertDateTime DateTimeFormat:="dd/MM/yyyy", InsertAsField:=True _
, DateLanguage:=wdEnglishUK, CalendarType:=wdCalendarWestern, _
InsertAsFullWidth:=False
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub
I have marked in bold where VBA finds a problem and highlights. Can someone please help because this has been driving me barmy!!!

Thanks

Dan
 

Read other answers
RELEVANCY SCORE 69.2

Hi Guys,

I have just set up a new laptop on Vista Ultimate for a chap at work and I'm trying to set up a macro in Word 2007 to speed up his invoicing procedure etc. When I try and run the macro I get the message "the macro cannot be found or has been disabled because of your macro security settings".

Word provides some suggestions for fixing this but they don't seem to be getting my anywhere. I've changed the security to enable all and the template suggestion (i.e that the template im trying to use must be correctly loaded) doesn't seem applicable since I'm just using the basic template that comes with Word 2007.

I've trawled forums for the last two hours and can't seem to find any advice or ways to solve the problem

Any help much appreciated!!!

Steve
 

A:Word 2007 Macro Help

can you post a copyhere and take out any sensitive info - or isthat too much work ?
 

Read other 2 answers
RELEVANCY SCORE 68.8

I'm working on a Windows Server 2003 Terminal Server. We have 9 users in our office connect to this server to do everything they need to do. All users are having the same problem. There were some documents that got saved to the auto-recovery (this was several months ago). Since that time, every time we open a word doc, it shows the auto-recovery list on the left. when we close Word it asks:
"The document recovery task pane contains some recoverd files that have not been opened. Would you like to view these files the next time you start Word?"
Yes, I want to view these files OR
No, remove the files, I have saved the files I need.

We click NO to remove the files, hit OK and it tells us it "can't delete the file, can't read from the source file or disk.". then we have to click OK 6 times for each file that is in the auto-recovery pane on the left.

Any idea how to make this go away??
 

A:Document Recovery in Word 2007

Did you ever find a fix for this?
 

Read other 3 answers
RELEVANCY SCORE 68.8

Tech Support Guy System Info Utility version 1.0.0.4
OS Version: Microsoft Windows 7 Home Premium, Service Pack 1, 32 bit
Processor: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+, x64 Family 15 Model 75 Stepping 2
Processor Count: 2
RAM: 3454 Mb
Graphics Card: NVIDIA GeForce 6150 LE, 128 Mb
Hard Drives: C: 178 GB (89 GB Free); D: 7 GB (0 GB Free);
Motherboard: ASUSTek Computer INC., Hematite-XL
Antivirus: Microsoft Security Essentials, Enabled and Updated

Please help! I have mozilla firefox which uses .pdf for saving any word files. I created a document and I had no option to save it as anything but a pdf file. I need to convert this to a word document asap for work. Somehow when I opened the pdf file in a word format all that comes up is letter, symbols and numbers. My document is not gone but can't be opened in a word format so I can then save it to word. I know I sound illiterate and using the wrong terminology but I'm hoping I gave enough info. Also, when I open the pdf file, my PC only wants to print it. There's no command to close it. When I do try to export the pdf, I get a page that wants me to subscribe to Adobe ID. I already have that but it won't accept my password and keeps emailing me security codes. By the time I get back to enter the code, Adobe ID says that code is invalid and gives me a new one. I'm so perplexed. Why oh why can't there be an easy fix to anything!!!
Thanks in advance.
Iggy9570
 

Read other answers
RELEVANCY SCORE 68.8

I want to change the default margins in normal.dotm but can't find any help for Word 2007 running in Windows 7.

As I recall, it is essential to work on normal.dotm so I need to know how to open it to change it.

I should add, it is not the same as either XP or Vista.

Can anyone help, please?

TIA for any input.

Ed

A:Dafault New Document Word 2007

Do you mean it ?

Read other 7 answers
RELEVANCY SCORE 68.8

I just started using office 2007 and I am having a problem with a document created in word 2000. I have a document that has form fields that when I use it I tab through the various form fields filling out the information and when done with that I un-protect the document (previously I had put a "protect form" button in the tool bar). In word 2007 it seems to be a more drawn out process. Is there any way to just add a protect form button again and make this a one step process? Thanks in advance!
 

A:protecting a document in word 2007

You could surely record a macro and assign a button to the macro, no? Alternatively, see if you can't find the menu command to protect under customizing toolbars (Tools-->Customize in 2003)
 

Read other 2 answers
RELEVANCY SCORE 68.8

I believe that the document properties in Word 2007 (especially author) is being picked up from the login name in windows XP. I know how to change the document properties on a single document, however, I would like to know how to change the document properties for WORD -- period. In other words, I don't want my login name to be the author, I want my REAL name to be the author. Also, my company name is NOT in my login info, so there is no company coming up, I would like to change these properties so that everytime I start a document it's already there. So far everytime I change the properties, then close the document and start a new one, it goes back to the original. (I assume this problem is being perpetrated throughout the Office Suite...)

Is this an option?

Thanks for any information about this you can provide,
 

A:word 2007 document properties

Read other 6 answers
RELEVANCY SCORE 68.4

hi!

i'm constanly getting an error message that "the function you are attempting to run contains macros or content that require macro language support"

i never had that problem before, and i keep getting it constantly....

i attached a pic of the error message
 

Read other answers