Pages

Search

Microsoft Word - Word macros - advanced

Microsoft Word - Word macros - advanced


Word macros - advanced

Posted: 19 Aug 2013 12:59 PM PDT

I have an 85-page word document with hundreds of bookmarks. I need to be able to pull data from Excel fields and tables into these bookmarks. The tables need to come in as pictures, and the fields are named single-cell ranges whichi correspond to the bookmark names. I have a somewhat-working Excel macro to push these bookmarks in, but nothing to get the tables into Word as a picture.

 

Help...?

 

P.S. I'm an Excel MVP

Having trouble with finding in Header only

Posted: 19 Aug 2013 12:52 PM PDT

I am writing a macro to have the user select a bunch of documents (code not shown) via the File dialog and then my code is opening up each document and testing if there is a phrase in the header of the document (just the header though to prevent mismatches).  Just cannot get the "Find" to work on a template with the known phrase in it.  What am I doing wrong.

Note: loFileDialog has already been set up and vars initialized.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

' loop through list of documents and for each, open them, checking for letterhead "marker" and update them if they
' are a letterhead

For Each lcFilePath In loFileDialog.SelectedItems

    ' attempt to open the template
    Set loDocument = Application.Documents.Open(lcFilePath)
   
    With loDocument
   
       ' set a range object to the header in the first section; note that there should always be a "primary" header (with
       ' the "first page" header being optional)
      
        Set loHeaderRange = loDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range
   
        With loHeaderRange.Find
         
            ' this stuffed in by macro recorder: clear any formatting before starting
            .ClearFormatting
            .Replacement.ClearFormatting
   
            ' set up the Find box; do not match on case (to prevent admin person frustration); note to future users - you
            ' really need to make sure that the phrase chosen is only in "letterhead" type text and it should only be
            ' something in the header as principal's names are found elsewhere in the document
           
            .Text = "Member of the New York bar"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = False
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
   
            ' Execute the find
            llFound = .Execute()
           
            ' if not found, do not touch this document: just close it (BELOW JUST TO SHOW RESULT)
            If llFound = False Then
               MsgBox ("Not found")
            Else
               MsgBox ("Found")
            End If
           
                       
        End With ' for With loHeaderRange.Find
     

you have exceeded the maximum number of pages in Word

Posted: 19 Aug 2013 12:41 PM PDT

I've only seen threads at least a year old on this subject, and there were several grumpy posters when they were added to.

 

My computer started doing this within the last 3 months, and on documents that are relatively small (<200 pages, <1 MB)  My IT guys have no clue.  It happens with both .doc and .docx files.  It seems to happen more often in documents with multiple links in them, which is a huge problem as I often have documents with captions, table of contents, list of figures, list of tables.  Does Word not work if one tries to use the full functionality of the program?  How do I fix this?  I have done a riduculous amount of rework the last few months.  Pretty soon my hand will be going through my monitor.

 

I'm running Office 2007 with Windows 7 Enterprise OS, Service Pack 1,  on a  64 bit system.  This machine was designed to run modelling programs and should be more than sufficient to run Word and has run fine for at least a year.  What do I tell my HelpDesk to do to fix this?   

First page footer in new section

Posted: 19 Aug 2013 11:57 AM PDT

I have a 24-page booklet that Word has divided up into sections and whose first page has no page number. Section 1 ends on page 6, and section 4 begins on page 7. (I don't know where sections 2 and 3 are, but that's not affecting the document). Page 7 has no page number. If I click in the footer, I see "First Page Footer -- Section 4." I don't want a first page footer. Other beginning sections have continuing, consecutive numbering with no first page footers. How do I get page 7 to appear?

Ed LeRoy

Form Field Validation Question

Posted: 19 Aug 2013 10:22 AM PDT

 

Hello,

 

In Microsoft Word Form Fields – Legacy Tools, is there a way to add a validation to a Field after the other options are set?  Meaning if I set the Properties to 8 for Max Length, is there also a way like in Excel to alert the user if less than 8 characters are entered (meaning a disply prompt to alert them to complete the full 8 for Max Length if less entered)?

 

Thanks for you review and would like to perform this without using Macros if possible.

 

Jenny B.

International Character Symbols AND double interlocked male/female symbols

Posted: 19 Aug 2013 10:13 AM PDT

Has anyone created an [alt]+ (International Character Symbols) for the homosexual male and homosexual female character (It would be an interlocking ♂♂ or ♀♀?

Opening Word docs in Destop mode

Posted: 19 Aug 2013 09:54 AM PDT

I was looking at settings, personalization & other areas. Now I am unble to open any Word documents on my Desktop.

Still  able to  open Files, Adobe, pdf, etc. all except Word.

Please advise.

Many thanks.

 

Trouble opening Word

Posted: 19 Aug 2013 09:27 AM PDT

I tried to use some of the suggestions l found in the Forum to open Word.  Now when I click on Word in the All Program list, the Windows Media Player opens instead.  I can still click on save Docs to open Work with no problem but not from the list and not when I download a template from Microsoft

Inability to see a private character in Character Map

Posted: 19 Aug 2013 09:21 AM PDT

I believe I have successfully created a private character in Private Character Editor.  I used default code E000 and saved the character to all fonts ) using  file EUDC (whatever that means).  Presumably I should be able to find my private character in my Arial Character Map so I can copy and paste it into my document.  Unfortunately, it would seem that my private character does not appear in Character Map.  I am using Windows 7 Professional and Office 2003.  Any suggestions will be most appreciated.

Word 2007 is not opening

Posted: 19 Aug 2013 09:13 AM PDT

I can't open word (2007) from my All Programs list. If I click on a stored Word Doc its opens fine and then I can open a new blank page what's wrong?

Also, wen I tried to download a Microsoft letterhead template it never appeard, is that related?  Is this another Vista problem?

Word 2010 won't open a blank document

Posted: 19 Aug 2013 09:08 AM PDT

A month ago I made up a quick fax letter head.  I printed the page and then just closed Word.  Now, everytime I open Word that document pops up and it has a name of Normal.dotm.  How do I get a normal blank document to appear?  How do I get templates I have made show up in the list of templates when I want to open a new document?  My earlier version of Word had them listed with Word's own templates.

How do I highlight long pieces of text to discourage lengthy writing

Posted: 19 Aug 2013 09:07 AM PDT

Hi, 

I get lots of documents in where authors rabbit on over many pages. I'd like a macro or schema that uses Highlight to color in text:

Yellow: When there are more than four lines in a paragraph

Red: When there are more than four paragraphs between headings

And Black (i.e., make it unreadable, as if the reader has passed out through boredom) if there is more than eight unbroken paragraphs 

Ideally, I'd just press a button and it parses the existing document without me having to do manual labor. 

Can't find anything in the archives. 

Cheers. 


Interpret notepad

Posted: 19 Aug 2013 08:25 AM PDT

I look on notepad and get gibberish. How to I read this notepad. New at this and trying to learn about computer

Macro shortcuts don't work after code module rename

Posted: 19 Aug 2013 07:49 AM PDT

For years, I've had a few macros in a code module named "NewMacros" in the Normal project. I can't recall now how it got that name, but I decided to rename it to "MyMacros", which I did. Now none of my keyboard shortcuts assigned to those macros work.

I tried executing the macros manually from the Developer tab and they work fine that way.

I tried reassigning the shortcuts. All of the macros are listed, but even a reassign, either to the original shortcut or to a new one, doesn't get them to work from the shortcut.

I also tried restarting Word and rebooting the computer.

If I rename the module back to "NewMacros", then everything works fine. Surely the module doesn't have to have that exact name, does it?

Can anyone help me out of this?

Thanks

Is there a way to count how many images are in a document?

Posted: 19 Aug 2013 07:01 AM PDT

I'm not finding an answer in all other online searches.  Does anyone know if this can be done?  Thanks.

Word Heading and table Numbering

Posted: 19 Aug 2013 06:22 AM PDT

Having got an understanding of heading numbering I want to see if the following can be done?

My document has numbered headings for each section. Within certain sections I have a series of tables. Each table has a numbered title and numbered sections.

Currently I used word numbering for the section headings (ToC) and table descriptions, that works fine. However I manually enter all the numbered titles and entries that appear in the body of the table.

Can I auto number these lines as well? One concern is that the heading maybe number 5, the first table under this heading is table 1 and line entries in the actual table would be 1.1, 1.2 etc.

Reason is I may need to add another table earlier on in the document which means a lot of manual updating!

Andy

Editing a border with logo and page numbers

Posted: 19 Aug 2013 06:19 AM PDT

If I create a box border, how can I add a logo/picture in the header and page numbers in the footer within the border line???

Removing highlighting

Posted: 19 Aug 2013 05:02 AM PDT

Hi, 
       There's a problem when I use Word and OneNote. If I highlight text in OneNote and transfer it to Word, the highlighting can't be removed. The same thing happens when I copy highlighted text from somewhere on the internet. How do I remove the unnecessary highlighting in Word? Please help.

Removing highlighting

Posted: 19 Aug 2013 04:57 AM PDT

Hi, 
   I have a problem when I shift text from OneNote to Word. If I've highlighted a paragraph on OneNote and then copy it to Word, the highlighting still remains. This even happens when I copy text from a website that has highlighted words. For this reason, I have to remove the highlighting in the OneNote document itself and then shift content to Word. Is there any feature in Word which can allow me to remove all highlighting which is otherwise not removable?
  Thank you,

Windows 7 , Microsoft office , Working a word document , dots appeares in between any word

Posted: 19 Aug 2013 04:54 AM PDT

Today working a word document , (1) dots appeares in between any word and (2) a signal(two verticall lines paralel to each other , with a bold dot at the left top of the first one) to the end of each line . This happened again in the past and was corrected by a friend , but I do not remember the steps .

 

 

 

word 2010 opens same document every single flipping time

Posted: 19 Aug 2013 03:32 AM PDT

Help me please! every time I open word it has the same long document which i have to delete. I have found instructions on how to solve this problem for older version so I presume that someone somewhere knows how to solve it. Please reply if you know what to do! x

Office 2013 custom template as default

Posted: 19 Aug 2013 12:48 AM PDT

Please can anybody tell me how I can set my custon templates to default in the new page?

Frankly I don't care much about online or any other templates. I use mine for my bussiness and I don't like it that I have to change to personal on the tab everytime I want to open a new document.

I think it is very annoying for the users that Microsoft doesn't set that as the standard option.

My excuses for my poor english...

Hajo

How do I send to a usb stick a document saved in win8

Posted: 19 Aug 2013 12:31 AM PDT

I want to send to a usb stick a document saved in win8

Legal Pleading Wizard captions

Posted: 18 Aug 2013 10:54 PM PDT

I wondered if it was possible to add custom caption boxes to the Legal Pleading Wizard for Microsoft Word 2003?  As it stands, the wizard offers five choices, including no caption at all, and I want special captions that I make available when I use it.  The four captions it offers have to be stored somewhere!  I know that newer versions of Word have quick parts, templates and other methods for such creation, but I simply want to use this wizard interface to make my legal templates.  Any suggestions?  Thank you! :)

Word 2010 error using macro Selection.Sort: Run-time error '9125': String Passed can't be parsed

Posted: 18 Aug 2013 09:36 PM PDT

Using Selection.Sort within a Word 2010 macro where FieldNumber is "Field 2" or greater, an error is generated.

 

The error generated is:

Run-time error '9125': String Passed can't be parsed

 

This line works fine:

Selection.Sort ExcludeHeader:=False, FieldNumber:="Field 1", SortFieldType:=wdSortFieldAlphanumeric, SortOrder:=wdSortOrderAscending, Separator:="=", SortColumn:=False, CaseSensitive:=False, LanguageID:=wdEnglishUS, SubFieldNumber:="Paragraphs"

 

But this line generates an error (only difference is "Field 1" was changed to "Field 2":

Selection.Sort ExcludeHeader:=False, FieldNumber:="Field 2", SortFieldType:=wdSortFieldAlphanumeric, SortOrder:=wdSortOrderAscending, Separator:="=", SortColumn:=False, CaseSensitive:=False, LanguageID:=wdEnglishUS, SubFieldNumber:="Paragraphs"

 

(http://support.microsoft.com/kb/231631) indicates it was a problem in WD2000, but I would expect this was addressed since "Paragraph" and "Field 1" works.

 

Curious if MS ever fixed this in future versions.

Thank you.

why do i keep gettin message when i want to open a document that office is busy

Posted: 18 Aug 2013 07:44 PM PDT

I keep getting a message saying office is busy, and won't let me open up documents

Automatic capitalization after opening quotation marks

Posted: 18 Aug 2013 05:59 PM PDT

I'm trying to write character dialogue in Word 2007 (Office edition).

What I get: (previous sentence)
                 "so," he said, "why are you here?"
                 (next sentence)

What I want: (previous sentence)
                   "So," he said, "why are you here?"
                   (next sentence)

In other words, I'd like Word to automatically capitalize the first word in the sentence after a hard carriage return and after opening double-quote marks.

I've already got Autocorrect capitalizing the first word in sentences, but it seems as if the Autocorrect sees the " as the first word and doesn't see the actual word after them as being the 'first word'.

Is there any way to set this up automatically?

Email association problems.

Posted: 18 Aug 2013 05:21 PM PDT

Email association problems.

 

When I try and send something to Mail Recipient, the following message comes up, can someone please talk me through the steps to associate my Mail, or yahoo mail (prefer yahoo mail) on windows 8 please?

There is no email program associated to perform the requested action. Please install an email program or, if one is already installed, create an association in the Default Programs control panel.

 

I have been into the default programs control panel and tried to do it myself but I must be missing a step to allow this to happen. Thanks in advance.

Problem opening a document in desktop Office from Office Web Apps

Posted: 18 Aug 2013 04:10 PM PDT

Hi,

 

Using SharePoint Online I can do the following:

  1. Open a document directly into desktop Office
  2. Open a document directly into Office Web Apps to view and edit

But I cannot click the "Open in Word" option in Office Web Apps and then open the document in desktop Office. Instead we get the message "Sorry but to open this document, your computer must be running a supported version of Microsoft word and a browser that supports opening files directly from web apps" and then it tries to use Office on Demand.

 

We're running Office 2013 on the desktops, using IE10 (32 bit) and Windows 7 (32 bit) operating systems.

 

For some reason when trying to open from OWA to the desktop version of Office OWA thinks Office is not installed on the computer.

 

Any ideas how we can fix this?

 

Thanks,

Andrew

How can I format a table such that it does not break the formatting of my paragraphs?

Posted: 18 Aug 2013 03:55 PM PDT

Hello,
I am trying to insert a picture and its caption within a table in a document. I can format the table so it wraps the text and stays put at the top of the page. The issue is that it seems to break up the paragraph formatting. If I insert it at the beginning of a line mid-paragraph, it wants to break apart the paragraph at that line. However, if I add on to a paragraph before where the table is positioned, the table stays put but the broken paragraph does not re-form. If I try to delete the space and re-form the paragraph, the table is deleted as well.

Is there any way to insert the table so it doesn't break up the paragraph? If not, is there an alternate way to insert a picture with its caption?

Thanks!

Word document

Posted: 18 Aug 2013 03:04 PM PDT

I'm trying to type a letter in Word 7, but I keep getting a message at the bottom of my screen telling me it's locked.  How do I unlock this so I can type my letter?

having problem with mail merge

Posted: 18 Aug 2013 10:02 AM PDT

I am trying to create a mail merge but only envelopes, labels, start mail merge and select recipients are highlighted the rest are not. why is that?