# Microsoft Word

27K

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.

I am now unable to access it, it is saying that it has been renamed/deleted/or moved.  Just wondering if there is any way to recover it
0
Hello - Is it possible, from a MS Word 2010+ docx, to link to a pdf file (IRS form 1099R, specifically), and position mail merge fields in the form boxes?

I have always done this from MS Access reports in the past, but now I need to do this from Word, so the user can mail merge a 1099R form with a cover letter.

They are not wild about the idea of printing the cover letter from Word, and then printing the 1099R from Access as a separate step.

Thanks
0
Need to make Word 2018 print a Booklet with 8 panels

I asked someone to create for me a Word template for the following booklet type:

I was given the following:

8-Field-Brochure-Template.docx

and was told it works fine on Word 2010.

InWord 2018 I do not see how to set to 8 pages...

I see 6 or 9,,not 8.

Any idea why not?

Thanks.
0
Hi

I am trying to work out the best way to send an order document from my ASP.net web app. Initially I looked at creating a PDF document from scratch
and found that this is quite complicated. Is there a way to use some sort of template document in Excel, Word or PDF that I can just populate with numbers
and text?
Another alternative would be to use html to build a sort of document in the body of the email?
A further way would be to create an ASP.net web page that could be printed off
0
My requirement is to grab two texts between two flags placed in word file and write in to excel - 2 columns
Flags can be [mydate] and [/mydate]
and [mytext] and [/mytext]

e.g. [mydate] 2018-07-14 [/mydate] blah blah [mytext] this is my text [/mytext]

It should be repeated until all occurrence in the file.

I am using following code as guided by GrahamSkan

Option Explicit

Sub GrabUsage()
Dim FName As String, FD As FileDialog

Dim WApp As Word.Application 'Object
Dim WDoc As Word.Document 'Object
Dim WRange1 As Word.Range
Dim WRange2 As Word.Range

Dim ExWks As Excel.Worksheet
Dim ExR As Excel.Range

Dim r As Integer
Dim bTesting As Boolean
Dim bVisible As Boolean
Dim bNewWordApp As Boolean
Dim bFinish As Boolean

bTesting = True
Set ExWks = Selection.Worksheet
r = 1

If bTesting Then
FName = "I:\Allwork\ee\29108962\InDoc.docx"
Else
'let's select the WORD doc
Set FD = Application.FileDialog(msoFileDialogOpen)
FD.Show
If FD.SelectedItems.Count <> 0 Then
FName = FD.SelectedItems(1)
Else
Exit Sub
End If
End If

' open Word application if necessary and load doc
On Error Resume Next 'supress error checking for one line only
Set WApp = GetObject(, "Word.Application")
On Error GoTo 0
If WApp Is Nothing Then
Set WApp = CreateObject("Word.Application")
bNewWordApp = True
End If
'make word application visible after

0
Hi everyone, what tools are commonly utilised by Enterprise to target and collect a paticular staff members data? By data i mean emails, local documents, files and folders, deleted items, downloads. Key word content sweeping, login / logoff details, credentials and passwords. I am the business owner but im being targeted by my business partner and i currently have a litigation case against him before the supreme court. Besides our company he has an IT managed services company and runs my businesses infrastructure. We are using Office 365 Enterprise, domain server and exchange server. My laptop is logging non-stop and many of the logs are hidden and the ones that arent are enough to male me paranoid. I even feel like they have physically been in my machine via Screen Connect client or teamviewer perhaps. There seem to be more and more 'Machine Users' S-1-15-21 DDDAFDEKXTNKWLP type user. And my laptop will suddenly and violently start blinking on and off like a strobe light. Its not the screen or a connector and if i put on Aeroplane mode it stops. Ive run Malwarebites and shows nothing. All drivers and updates are up to date.... help please how can i prptect myself? What am i looking for to detect internal corporate spying locally? Visiual Studio; SQL Server; .NET framework, Power Shell are all running locally on my laptop also. Thanks Rob
0
I'm looking for an MS Word VBA macro to remove redundant blank paragraphs spacing from Word documents.  There are many examples of snippets which replace ^p^p with ^p and loop to catch ^p^p....^p such as GrahamSkan's answer to Q 23519746. When run these have the effect of making all paragraphs in a document contiguous i.e. there are no gaps between them.

Instead, I would like that where any two text-containing paragraphs were previously separated by one or more blank paragraphs then following the macro being run each such pair should be separated by only one blank paragraph. In other words, paragraphs that were previously separated from each other should remain separated but that separation should where necessary be contracted.

0
I created several macros in MS Word for a letter I am using.

When I send the letter (email) the letter the macros do not transfer to the next users computer?

How do I get the MS Word macros to transfer with the letter when I send it?
0
How to get MS Word message box to display content vertically?

Dim strInText As String
Dim strOutText As String
strInText = "MATERIALS ASSESSMENT                                                                          Structural failure, Handling Characterictics,Installation characteristics, Chemical exposure, Defective material, Materials not inspected, Wrong materials delivered, Material failed after installation, Characteristics/design presents non-typical handling/use challenges,  None of the Above "
strOutText = Replace(strInText, ",", vbCrLf)
MsgBox strOutText

End Sub
The MS Word macro I adjusted to get the items to display vertically, but I don't know the macro should be written to get the items to display vertically unless I use this long sentence with commas in it, see macro below:
Macro-Vertical.jpg
0
Below is a section of MS Word VBA code which removes duplicate paragraphs from a document. It retains the first instance of each paragraph it finds, and deletes any subsequent instances ("duplicates").  Does anyone know how I might amend the code so that instead:

1) it deletes the first and all subsequent instances of each paragraph except the last instance (the one closest to the bottom of the document) which it retains? PS: since posting I have figured this one out.

2) It deletes all instances of a paragraph which has duplicates, retaining none?

3) In the process of trying to solve (2) I realise that I don't really understand how the 'collect duplicates' section works. If anyone could explain that to me I would be very grateful!

Sub DeleteDuplicateParagraphs()
Dim p As Paragraph
Dim d As New Scripting.Dictionary
Dim t As Variant
Dim i As Integer
Dim StartTime As Single

StartTime = Timer

' collect duplicates
For Each p In ActiveDocument.Paragraphs
t = p.Range.Text
If t <> vbCr Then
If Not d.Exists(t) Then d.Add t, New Scripting.Dictionary
End If
Next

' eliminate duplicates
Application.ScreenUpdating = False
For Each t In d
For i = 2 To d(t).Count
d(t)(i).Range.Delete
Next
Next
Application.ScreenUpdating = True

MsgBox "This code ran successfully in " & Round(Timer - StartTime, 2) & " seconds", vbInformation
End Sub

0
What's the difference between BaseAdapter, SimpleAdapter, Custom SimpleAdapter, ArrayAdapter and Custom ArrayAdapter in Android ? I have see some articles but I can't identify when I select one over anothers ?

Thx
0
Need a Word Template (Mac) for multi-fold booklet

I love the idea of using this little pocket booklet, but can not make this template in Word.

I assume the template would maintain the proper orientation, for example.

Can anyone dig one up for me?

Thanks.
0
I am trying and (so far) failing to adapt a Word VBA macro to run in Outlook 2016. I wonder if anyone can help? Within Outlook I have referenced the Microsoft Word 16.0 Object Library, and I have tried to use the suggestions at http://www.vboffice.net/en/developers/use-word-macro-in-outlook/  and https://www.slipstick.com/developer/word-macro-apply-formatting-outlook-email/ but without success.

The Word VBA I am trying to use is below. Its purpose is to remove redundant (repeated) paragraphs which it does in Word. I want it to perform the same function on an email message which is open and being edited within Outlook 2016.

Sub DeleteDuplicateParagraphs()
'PURPOSE: Remove Duplicate Paragraphs Throughout the Entire Word Document

Dim p1 As Paragraph
Dim p2 As Paragraph
Dim DupCount As Long

DupCount = 0

For Each p1 In ActiveDocument.Paragraphs
If p1.Range.Text <> vbCr Then 'Ignore blank paragraphs

For Each p2 In ActiveDocument.Paragraphs
If p1.Range.Text = p2.Range.Text Then
DupCount = DupCount + 1
If p1.Range.Text = p2.Range.Text And DupCount > 1 Then p2.Range.Delete
End If
Next p2

End If

'Reset Duplicate Counter
DupCount = 0

Next p1

End Sub

0
Is it possible to send an email through Word VBA (0365), where I can add 2 attachments, use a specific email template that is stored on a network drive and have that users signature added to the email template.

I have got several different attempts working using code examples off the net that allows me to send emails but only at the sacrifice of one of the above requirements.
0
Hi All,
I'm working with an MS Word template using fields linked back to another system.  The text in the fields are a variety of color codings.  I'm trying to create a macro that, On Open, will set all of the text to black.  Can anyone help me?  Thank you!
0
I’ve been working on the ‘Delete_All_Bookmarks_in_Selection’ macro so that I can remove all bookmarks in a selected range. It works fine if the selection is outside a table, but if I select only part of the table, it removes more than the bookmarks in that selection.

The attached document contains that macro and a test table whose bookmarks were created with the other attached macro, ‘Create_Bookmark_for_Each_Row_in_Column’
There are six bookmarks- three in each column of the test table. By selecting whole of column 2  and running ‘Delete_All_Bookmarks_in_Selection’ and choosing ‘No’ to delete bookmarks only in the selection, the macro removes all bookmarks in the whole table. I want it to delete only the bookmarks in that selected column.

If I restore all six bookmarks and then select the bookmarked text in row 1 column 2 (‘TestRow1Col2’), run the ‘Delete’ macro and choose ‘No’ at the first prompt, the macro deletes the ‘TestRow1Col1’ and ‘TestRow1Col2’ bookmarks and leaves the others alone. I want it to delete only the bookmarks in row 1 column 2.

I’m using the ‘Selection.Range.Bookmarks’ code to identify bookmarks in a selection, but evidently it doesn’t work properly in a table cell or cells. Can anyone suggest an alternative? Is it practical to loop through the cells in a table selection and delete the bookmarks in the selection that way?
Bookmark-Text-in-Table-Column-Test2.docm
0
(Windows 10, Word 2013)

I want to eliminate a line space in a list of endnotes (Word 2013). I have tried everything I know (right clicking, selecting paragraph etc) but have not succeeded in eliminating the empty line.  I am enclosing a screenshot of the problem so you will easily see my problem.
endnotes.png
0
I got the following pages after converting a PDF to Word. I want to combine the two tables, but don't know what the problem is or how to fix it.

1
Grab text from a word file with Excel VBA
=======================================
My requirement is to grab two texts between two flags placed in word file and write in to excel - 2 columns
Flags can be [mydate] and [/mydate]
and [mytext] and [/mytext]

e.g. [mydate] 2018-07-14 [/mydate] blah blah [mytext] this is my text [/mytext]

It should be repeated until all occurrence in the file.
Sub GrabUsage()
Dim FName As String, FD As FileDialog
Dim WApp As Object, WDoc As Object, WDR As Object
Dim ExR As Range

Set ExR = Selection ' current location in Excel Sheet

'let's select the WORD doc
Set FD = Application.FileDialog(msoFileDialogOpen)
FD.Show
If FD.SelectedItems.Count <> 0 Then
FName = FD.SelectedItems(1)
Else
Exit Sub
End If

' open Word application and load doc
Set WApp = CreateObject("Word.Application")
' WApp.Visible = True
Set WDoc = WApp.Documents.Open(FName)

' go home and search
WApp.Selection.HomeKey Unit:=6
WApp.Selection.Find.ClearFormatting
WApp.Selection.Find.Execute "[EventDayMth]"

' grab and put into excel
Set WDR = WApp.Selection
ExR(1, 1) = WDR ' place at Excel cursor

'repeat
WApp.Selection.Find.ClearFormatting
WApp.Selection.Find.Execute "[EventDayMth]"

WDoc.Close
WApp.Quit

End Sub

0
I need to find a keyword in a word document title/name so that I can perform an if statement on the result

I have tried the following with a document that had the word "New" in it and this executed in the document open function:

If ActiveDocument.Name = "New" Then
MsgBox "New Found"
Else
End If

As you can guess...it didn't work out and that's why I am here!  :)
0
Attachment 1 is an MSWord doc which when I print to "PDFill"
printer, the blue border at the bottom left always appear even
if I set the border to "colorless".

For the bottom right border (in red), if I set it to colorless, it will
not appear in my PDFill output : refer to attachment 2.

I can always delete away the last four rows but seems like the
border on the left will still appear in the PDF output.

Need someone to edit the MSWord doc & test print to PDF so
that both the left & right borders don't appear anymore?

As long as the editing resulted in the same amount of the blank
space between the last row of the table, the line tt reads "This
statement does not include ..." & the green line at the bottomost.
FormBorders_templ.docx
FormBorders_templ.pdf
0
Hello, the company has a custom MS Word Macro. I copied the macro from one computer. I saved it to another computer specifically to %Appdata%/Microsoft/word/startup. When I try to run the macro, I got message "run-time error '91':  object variable or with block variable not set. I appreciate your reply :)

I notice I can't open the VBS editor as well from MS Word.

If ever this successfully run, how can I add this custom macro into button at MS Word.
0
Hi Experts,

I want reformat a large word document (1000 pages) so that, wherever in the document the blue text ( as shown in the attachment) is discovered it converts it to a table

The text color should remain as the original, in the document before reformatting.
The font should be as the table
The items next to the blue text differs and should be the second column of the table. The table will be 2 columns and 7 rows.

I have tried to do this, using a macro, which logically i can see is possible but  I am failing...  I would really appreciate your help - Thank you in advance
exmaple.docx
0
Hi, my 2007 Word defaults to a double space format and I want the one next to it (no spacing) to be the default.  I've looked under options and everywhere else I know to look but can't find a way to do it.  Can it be done?  Please see pic 1.  Thanks
0
I'm creating a Microsoft Word template. The document that will include a list of stated client goals, as a numbered list. Later, in another section, each of those goals will be fleshed out in detail. Now I know that I can create Cross References for each latter section, that will put in the names of the goals in that list. I can do that. But what if the total number of goals isn't known until the document is being generated?

In other words, what I'd like to be able to do is create a template that will allow me to create a numbered list, and then automatically create a sub-section for each item in that list, automatically. Sometimes that list might have 3 items. Sometimes that list might have 8, or 12, or 20.

Is there a way to have the document loop through the number of items in the list, and create the sub-sections on the fly?
0

# Microsoft Word

27K

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.