Microsoft Word

28K

Solutions

21K

Contributors

Microsoft Word is a commercial document editing program that is part of the Microsoft Office suite. It features numerous text-editing tools for creating richly formatted documents, along with tools for the use of macros in Word documents. Word's native file formats are denoted either by a .doc or .docx file extension. Plugins permitting the Windows versions of Word to read and write formats it does not natively support, such as the OpenDocument format (ODF) are available. Word can import and display images in common bitmap formats such as JPG and GIF. It can also be used to create and display simple line-art.

Share tech news, updates, or what's on your mind.

Sign up to Post

After the recent update, Word 2016 footnotes now appear as subscript, even though the font setting is superscript.  Apparently, there are several others with this same issue. I attempted to fix it for someone in the office and discovered that mine does it as well.  The only suggestion that I have found is to run Office Repair.  However we have over 2k employees with the potential to need this fixed.  Any suggestions?

I have tried resetting the normal.dotm but that made no difference and even tried every modification of footnote style available and it still made no difference to the location of the footnote number in both the note it self and the text in the body.
0
Where in the Word for Mac document Properties section of the File pulldown menu (or elsewhere) can I find identification like the following example, which is printed out on the last page of one of the candidate documents I have in the "haystack" of Word documents in my archives through which I am searching for a particular "needle":

F/Agmt/road_to_health_and_happiness.REV1
0
Hello and Good Afternoon Everyone,

            I have created 3 columns of information within Microsoft Word 2013 which is not straight.  Seeing that it would be very time consuming to manually take each one to straighten, I am wondering if there might be some automatic way of straightening each column.  

            Thank you

            George
0
We were assisted by EE in a question that made us place this question.  The insert that's reponsable is "it is actually possible to craft a non-addin PowerPoint macro-enabled file".  

That said, is setting our ms office apps to the most secure settings (macro) is the only way to protect ourselves from a powerpoint or word/excel/mail for that matter?  Also, is there a way to view he VBA contents without opening it (powerpoint/excel/wor)?
0
Dear Experts:

I got hundreds of tables in my active Document. I would like to run a macro that performs the following action:

For all the tables in the active Document: Adjust the bottom and top cell margins to 0.1 cm for all the cells of the second row.

Help is much appreciated. Thank you very much in advance.

Regards, Andreas
0
I am using macros to expand an collapse data within a table. I have every part working except for the first section. For some reason, it will collapse but then won't reopen again. Attached is an example.
test.docm
0
I have word document files, which i need to split each 5 pages to a separate file.

is this possible to be done  with VBA?
0
Hi All

I have a piece of code that opens a word document and performs a mail merge. When it is done i want to close the template without saving. I have added
Application.DisplayAlerts = wdAlertsNone
but it does not seem to be working or i'm not using it correctly. There might also be another way to achieve this. Below is the code that i'm using.
Private Sub cmdMerge_Click()
Application.EnableEvents = False
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.DisplayAlerts = False

On Error GoTo MyError

PrepareData
DoMerge

Application.EnableEvents = True
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
Application.DisplayAlerts = True

Exit Sub

MyError:
MsgBox Err.Description
Application.EnableEvents = True
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
Application.DisplayAlerts = True
Word.Application.DisplayAlerts = wdAlertsAll

End Sub

Sub DoMerge()
Dim appWd As Word.Application
Dim WdDoc As Word.Document
Dim strBookFullName As String
Dim cell As Excel.Range
Dim strWordPath As String
Dim txt As String

strBookFullName = ActiveWorkbook.FullName
strWordPath = Sheets("Program").Range("A2").Value
Set appWd = CreateObject("Word.Application")
appWd.Visible = True


With appWd
.Application.DisplayAlerts = wdAlertsNone
    Set WdDoc = appWd.Documents.Open(strWordPath)
    WdDoc.Activate
    WdDoc.MailMerge.OpenDataSource Name:=(strBookFullName), _
    

Open in new window

0
We have a plug-in that for some reason will not enabled unless logging into Word as Administrator (right click - choose run as Admin).  The weird thing is that when logging in as admin the shared network folders will not show up.  They will only show up when logging in regular and we can still go to the network drive and the location to see them, but this defeats the purpose of having the shared drives.  Any thoughts?
0
Hi All

When i run the code below for the first time i receive the error as per the title. When i run it a second time it run through correctly. I have read a bit on it and see that it could be late bindings or Implicit references but i don't really see if and where this would apply in the code below.
The code breaks on this line
 ActiveDocument.MailMerge.Fields.Add Range:=WdDoc.Bookmarks(cell.Offset(0, 2).Value).Range, Name:=txt & cell.Offset(0, 3).Value

Open in new window



Sub DoMerge()
Dim appWd As Word.Application
Dim WdDoc As Word.Document
Dim strBookFullName As String
Dim cell As Excel.Range
'Dim wdFind As Object
Dim txt As String
'Dim MyDoc As String

strBookFullName = ActiveWorkbook.FullName

Set appWd = CreateObject("Word.Application")
appWd.Visible = True

With appWd
    Set WdDoc = appWd.Documents.Open("C:\Users\Elmo\Documents\Aaron\2nd Project 2017\WorkingOn\VendorRebateClientDoc4March17_2.docx")
    WdDoc.Activate
    WdDoc.MailMerge.OpenDataSource Name:=(strBookFullName), _
    ReadOnly:=True, LinkToSource:=0, AddToRecentFiles:=False, _
    PasswordDocument:="", PasswordTemplate:="", WritePasswordDocument:="", _
    WritePasswordTemplate:="", Revert:=False, Format:=wdOpenFormatAuto, _
    Connection:="", SQLStatement:="SELECT * FROM `MergeRange`", SQLStatement1:=""

'Set wdFind = appWd.Selection.Find
    'finds text in word doc and replace with merge field
    For Each cell In Range("MergeText")
        
        'wdFind.Text = cell.Value
        
      

Open in new window

0
I receive some documents every week that need reformatting. They come with a mixture of non-breaking spaces and normal spaces at the beginning of each paragraph. I could use a simple Find & Replace (optionally embedded in a macro) to find the spurious characters and delete them but their number and distribution ae not the same week to week.

What I need is a few lines of code that find a paragraph mark and then somehow check each subsequent character and if it's a space delete it, continuing until a character in the range [A-Z] is reached. I will pre-process the docs to change all non-breaking spaces into normal spaces.

I'm working in Word 2003.

Thanks in advance.
0
Hi All

I have created a Word document and Excel workbook to do a mail merge. The word document contains bookmarks to indicate where merged fields should be added. All the work from creating the connection to adding the merge fields happens in a macro in the Excel workbook. Everything works fine. The only problem that i'm having is that formatting is not carried over into the Word document form the Excel workbook.  For example in the Excel wb a field might be a currency field with 2 decimal places when it is taken to the word document it does not retain this formatting and instead of $12.30 i end up with 12.3012943. I do not mind so much about the "$" signs as i can easily add this to the Word document the decimal places is the real issue. I have seen that when you add a field manually in a Word document and right click and Edit it there is a check box to Preserve formatting but i cannot find how to this with VBA. I have also tried to record a macro doing this but Word does not allow me to right click while recording. I have added the code i use below.
Sub DoMerge()
Dim appWd As Word.Application
Dim WdDoc As Word.Document
Dim strBookFullName As String
Dim cell As Range
Dim wdFind As Object
strBookFullName = ActiveWorkbook.FullName

Set appWd = CreateObject("Word.Application")
appWd.Visible = True

With appWd
    Set WdDoc = appWd.Documents.Open("C:\Users\Elmo\Documents\Aaron\2nd Project 2017\WorkingOn\VendorRebateClientDoc4March17_2.docx")
    WdDoc.Activate
    

Open in new window

0
I'm trying to find some VBA code to automatically check the Distinguish Style Source check box at the bottom of the Reveal Formatting Task pane in Word 2016.

While I can open the Reveal Formatting pane without a problem, I cannot find the command for this checkbox. In trying to record the steps, I only get the command to open the task pane.

Anyone know how to do this? Or if you know of a GPO setting or Reg-Hack I could do instead, that would be fine as well.
0
I have an Excel VBA script that writes to a Word document which is created from an existing template.

In the footer of this template, there are three sections.  From left to right:

- Date/Time (left justified)
- Descriptive Text
- Page Number (right justified)

The Descriptive Text is identified by a bookmark I created in the template.  It should be centered.  

Up until now, the Descriptive Text has, in fact, been centered (or so it seemed).  However, when I added another word to the end of this text, it becomes off-center.  It looks like it is left justified starting at the insertion point of the defined bookmark.  

I tried changing the alignment of the text to "center", but then it tries to center the date/time on the left as well.

It would be so nice if I could demo this via a screen share or something!

Any guidance, suggestions, or encouraging "words" on how to accomplish this are most appreciated.  Thank you !!!
0
Hi,
On all of our systems using Word 2017, whenever we use the arrow keys to move the cursor left or right, the screen starts flickering, the cursor disappears and pops up further along, or it just moves very slow. It seems like the system is struggling when we are trying the do something really simple. It is  a bit of an annoyance when everything slows down and you don't know where the cursor is.
Any ideas on why this would be happening?
Thanks.
0
Can this be done or put a word inside PDF

If you trying to avoid having 2 separate files
0
Hi,

After copy past i got the margins issue, so that i used (^p and replace all) option my issue resolved but after that i faced the two or three words are mixing with each other like (theday will bebeautiful) so how can i solve this problem. please guide.
0
Hello Experts

I have a client who uses Office 2010.  MS Word acts kind of strangely.  She built a table in it (looks like an Excel Spreadsheet).  When she views the document it all filled in as she built it.  But when she prints it, several of the cells in each column are blank.

I thought it was smart tags, but when I ran that fix, it made no difference.  I had her email me the file and when I got it, it looked like it does when she prints it.

I can't upload it because it's all names, addresses and telephone numbers.

Any ideas about how to resolve this?

Thanks in advance

thedslguy
0
Hi guys,
I would need your help. I have a document with several sections (i.e. Services), and the idea is to create checkboxes on start. If we select one service, the section regarding it is shown, if we don't select it, it remains hidden.
Example
Service 1
Service 2
Service 3

Section Service 1 (with content bellow)
Section Service 2 (with content bellow)
etc.

So services that i select with checkbox are visible and the ones that are not, remain hidden. (also it would be good if there is a possibility to keep the sorting, that if I select first Service 2, then Service 1, to still be in the document in line).

I'm quite new in this and I would really appreciate all the help I could get.
0
Hi Experts,
In the updated Word 2017, my VBA code to insert a picture, which used to work in previous versions, now runs to the point of selecting the picture I want inserted. I select the picture and then receive the error: Run-time error '5382': The graphics filter was unable to convert this file.
Please see the code I was using below. When I ask to debug, it highlights the line of code near the bottom, which is "res = dlg.Show()"
Thanks for you help.

Sub InsertPic1A()
    Dim wrdDoc As Word.Document
    Dim wrdTable1 As Word.Table
    Dim wrdTable2 As Word.Table
    Dim wrdRow1 As Word.Row
    Dim wrdRow1a As Word.Row
    Dim wrdRow2 As Word.Row
    Dim wrdRange As Word.Range
    Dim wrdCell As Word.Cell
    Dim f As Integer
    Dim c As Integer
    Dim wrdField As Word.Field
    Dim wrdFormField1 As Word.FormField
    Dim wrdFormField2 As Word.FormField
    Dim strTitle As String
    Dim strNewTitle As String
    Dim tbl As Table
    'table 1 contains the selection
    Set wrdTable1 = Selection.Tables(1)
    
    Set wrdDoc = ActiveDocument
    Set wrdRow1 = wrdTable1.Rows.Last
    UnLockDoc
    
    Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.Delete
    With Selection.Font
        .Name = "Arial"
        .Size = 8
        .Color = wdColorRed
        .Bold = False
        .Italic = False
    End With
    Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
        "MACROBUTTON InsertPic1B [P]", 

Open in new window

0
Hi,
On this site here
http://superequity.com.au/win-red-balloon-1000-voucher/
if you fill in the form,
you get a green line surrounding the form (its the usual green line that goes around the saying"your submission was successful")
However, because it was doing this I redirected the form to a thank you page instead, HOWEVER for a brief moment you see a big green line around the whole form.

Does anyone know to get rid of that message?
A
0
I'm looking for the VBA equivalent of the Picture Tools, Format, Color, Recolor feature in MS Office.  This is available via the contextual ribbon menu (I'm working in PowerPoint) when you select a bitmap image.  Embedded below is a sample bitmap from our corporate icon library.  The color splash behind the black drawing recolors beautifully to any color you choose using the above feature.  clock icon green iconEverything I have read online suggests that Microsoft did not expose this method for direct manipulation in VBA.  I hope the posts are mistaken!

Does anybody know how to accomplish this?  Is this method maybe available in newer versions of Office? (I currently use 2010 but will be upgrading soon to 2016)  Or does anybody know of a robust workaround?  Assuming the icons are all like the ones above, consisting of black, one color, or transparent, I might be able to use getpixel and setpixel to do it the hard way if necessary.  I've read about those but have no experience using them.

Thanks for any suggestions!
0
My current macro code (see code below) finds all instances of the following three string formats (which are work order #'s) in a Word 2010 file (the file can be anywhere from 10 to 100 pages) and pastes them into a new Word file, one string per line:
  AAA-#### (where AAA could be any letter from A – Z, followed by a dash, then 4 numbers)
  ####-####### (4 numbers, followed by a dash, then 7 numbers)
  AAA-##-#### (where AAA could be any letter from A – Z, followed by a dash, 2 numbers, a dash, then 4 numbers)

Two changes I would like to make to the above current macro:
  • I would like to update the macro so it only searches for one of the three text strings above (as the other two text strings have since become obsolete) to then paste into a new Word file, one string per line:
####-####### (4 numbers, followed by a dash, then 7 numbers)

  • I would like the macro to generate an error message as a dialog pop-up box at the first instance it comes across a text string that does not follow the approved format as outlined above (####-####### [4 numbers, followed by a dash, then 7 numbers], with the error message that includes the problem text string (work order #) to assist the user in locating the erroneously-entered work order number in the document and fixing it. Once the user corrected the work order number, the user would then re-run the macro.

The two instances of wrongly formatted strings for the…
0
I'm looking at how to get our agency going with digital signatures.  I would need to be able to digital sign pdf's, word docs and excel.

How do I get started?

Thanks
0
Hi All,

We have an requirement to adjust formatting and layout (like., fonts, line breaks in table, columns and margins) of word or PDF files using any script [Perl, Python or Ruby].

Can you please suggest or provide any references or sample codes for this or suggest which scripting languages will be good for such requirements.

Thanks,
Shail
0

Microsoft Word

28K

Solutions

21K

Contributors

Microsoft Word is a commercial document editing program that is part of the Microsoft Office suite. It features numerous text-editing tools for creating richly formatted documents, along with tools for the use of macros in Word documents. Word's native file formats are denoted either by a .doc or .docx file extension. Plugins permitting the Windows versions of Word to read and write formats it does not natively support, such as the OpenDocument format (ODF) are available. Word can import and display images in common bitmap formats such as JPG and GIF. It can also be used to create and display simple line-art.