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

Hi,

In a word document, I want to insert results from a database.
At the top of the document, I have one field where I set a variable to the database (ms access) path:
{ SET DataSource "C:\\myPath\\test.mdb }

Open in new window

But whenever I use it with the Database field, I get an error, Something close to: "Incorrect result for a table".
Below is the Database field I'm using:
{ DATABASE  \d "{ DataSource }" \s "SELECT `product` & \" / \" & `ContractNumber` FROM `Contract` WHERE `SIRET` = '{ MERGEFIELD SIRET }'" \* charformat

Open in new window

Before inserting the DataSource field, I had no issues, I even used it in another Database field (in the same document) as follow:
{ Set ContractCount { DATABASE \d "{ DataSource }" \s "SELECT COUNT(`ContractNumber)` FROM `Contract` WHERE `SIRET` = '{ MERGEFIELD SIRET }'" }

Open in new window


What did I do wrong ?
0
Build an E-Commerce Site with Angular 5
LVL 13
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

I have an c# application created in VS2005(.Net Framework 2.0) using Microsoft Interop Word Dlls.
Now we are migrating this application to Windows 10 and while building the solution I get the below errorsScreen shot of Word Interop ErrorScreen shot of Word Interop ErrorScreen shot of Word Interop ErrorScreen shot of Word Interop Error
0
I'm using a VBA form in MS Word. Is it possible to:
1. set focus on a non-MS program that is already running and in the background?
2. copy text of that window into the clipboard and then reset focus back to the VBA form?

I tried using AppActivate ("ProgramName.exe") , nothing appeared to happen.
I can create a instance of the program using Shell, but that's not the object here.
The already open window (even before opening MS Word) has a page of text that I'd like to parse into variables & place into the Word document.
I'd like to do this programmatically.
0
I found the below macro/code in a Google search and I inserted into an MS Word 2010 (32-bit) document. The macro works great in MS Word 2010 (specifically, takes what the user enters into a form field named "Title:" and saves that text along with "SOP" and the current date in a specific folder on a network share). Unfortunately, the macro does not run in MS Word 2016 (64-bit). Can anyone assist in adjusting the macro/code to also run in Word 2016? Any assistance is greatly appreciated. Thanks much in advance- apc
 
Sub FileSaveAs()
    Dim MyDocTitle As String
    MyDocTitle = Format(Date, "mm dd yyyy")

    Selection.HomeKey Unit:=wdStory
    Selection.Find.ClearFormatting
    With Selection.Find
        .Text = "Title:"
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute

    If Selection.Find.Found Then
        Selection.MoveRight Unit:=wdCharacter, Count:=1
        Selection.EndKey Unit:=wdLine, Extend:=wdExtend
        Selection.MoveLeft Unit:=wdCharacter, Count:=2, Extend:=wdExtend
        If Len(Selection.Text) > 1 Then
            MyDocTitle = Selection.Text + " SOP " + MyDocTitle
        End If
    End If

    With Dialogs(wdDialogFileSummaryInfo)
        .Title = MyDocTitle
       …
1
Hello

I'm looking for any SW that would open the word document in webpage ( so html) where user can edit stuff, and finnaly compose me back word document, once user finishes
Any recomandation
0
I am trying to use Mail merge to create email signatures for a client. Most of it is fine, but they have 2 logo images that change based on the person.  They also want a custom URL link for each person attached to that image so that when you click on the image, it goes to the  personal landing page.  I can get Mail merge to insert the link on an existing picture, and I can get the mail merge to insert the custom picture without the link, I just can't figure out how to get mail mert to insert both.  I am using O365 version of word, so it is probably 2016.  Thanks for your help!
0
We have a windows 2016 file server with a DFS namespace.
Users have their shared drive "S" pointed to a share called \\dfsnamespace\shared.
Users currently have an issues with changes being lost on word documents which are edited by multiple users as they collaborate on these documents.
The problem is that if one UserA has the word document open then if UserB opens this document sometime later then he doesn't get prompted that UserA has the document open and UserB can only open it in read only mode. Thus UserB also gets a read-write copy of the document. Now if user User A saves the document with his changes and then later on UserB saves the document with his copy then the UserA's document changes are lost and UserB's changes are kept.

Have you seen this issue and what is the cause?

I ran the "Get-SmbServerConfiguration" and ensured that the "EnableOplocks" is currently set to "true" and has a "OplockBreakWait" setting of 35.
From these values I understand that if a windows 10 client machine is off the network for 35 seconds then this oplock will be released.
From these I understand:-
1.  If the UserA's client's machine goes to sleep state then the lock will be lost and thus UserB will get a read-write copy of the document and thus resulting in this issue. Is this write?  (I tested this in another environment and this is the behavior I observed there as well)
2.  If UserA switches from wired to wireless network then because network has changed then his lock will…
0
Could you please help me with formatting this template which I have inherited.  I am trying to replace the logo on the first page top left with the new one I stuck at the end of the document.  I am not familiar with page formatting and clicking here and there seem to not have much an effect.  Could you please please help modify this and also tell me for my own benefit, what needed to be done?

I converted from PDF to MS Word and it created all that black image on the second and third pages, not sure what this might be linked to the shading of the left column?

Also the whole document, does it have columns in it which is why text moves around in funny ways when I try to edit it?  is there a way to show the outlines of the columns or document formatting?
EE-sample-Governor-Newsletter-.docx
0
office 2016/365 embedded excel file In Word 2016 changing to unknown object after saving word file.

Cannot open embedded Excel Object in word file.: Opened Excel on users desktop, put Check mark in Ignore other applications that use DDE. (options - advanced - General section).
Opened Excel file from server and saved as .xls instead of (.xslx). Embedded (.xls) file in said Word document. Where able to open (.xls) file.  Deleted (.xlsx) file then re inserted object. Where able to open excel file.
After saving Word document with the re-embedded Excel files The Excel file with the (.xlsx) extension was listed as an unknown object and would not open.  
This document is used in Share Point by other users and works fine.
0
Hello Tech Guru's. I have an issue regarding Office 2016 Professional. We installed this on a computer with no issues.  when the user tries to use the Mail Merge feature in Word, they h would select the individuals they want to be put in the letters - but instead of those being selected, everyone in the address book would be selected.
I have tried troubleshooting the issue, restarting services, nothing seems to work.
0
Rowby Goren Makes an Impact on Screen and Online
LVL 13
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

I need code that will take user choices (from checkboxes on a userform that correspond to the Reference Type dropdown in the Word cross reference interface function) and apply them so a macro (‘Apply_Cross_Ref_Style’) that is intended to format cross references formats only those checkbox controls whose names include the reference type (control.name.text). The purpose is to segregate the cross references,  so that I can apply formatting to specific cross references while leaving others of the same type alone.

Example: if I want to format only cross refs that point to captions with the labels of “Figure” and “Table” but leave all other cross references alone (such as headings and numbered items), this is the only way I can think of doing so, since they all have the same REF (or wdfieldref) field type,

I have a sub (‘lblApply_Click”) in the attached file that reads the controls and populates a variable (‘Reftype’) with the truncated names of the Reference Type list items (Numbered list, heading, bookmark, etc.). The idea is then for the ‘Apply_Cross_Ref_Style’ sub to format only those cross references of those types. I have the line ‘If Left(oFld.Result.Text, 6) = "Figure" Then…’ there now to test the concept, and it works, but I need to loop through the ‘Reftype’ variable, which carries the cross reference type names that are selected in the user-checked controls to tell the sub which cross references to format. I believe this requires an array but I don’t know how to …
0
Hello,

I have created a Word-Document including Macros and saved it as a Template (dotm). The goal is, to make the file available for other persons on other PCs. They must not change the original file but they have to save a new file. (Of course this is the purpose of an Office Template). The problem is, that the macros arent there if the new file was being saved once. How can I make sure that the Macros are completely copied to the new File (and not just at the first start from the Template).

With best regards
Benjamin
0
WIN10 computer running Office 2019. Word will not show a document in the preview screen. I think it has something to do with the template either corrupt or something in the registry saved incorrectly. Any ideas?
0
Using Google Docs, is it possible to create a single document which has some pages orientated in landscape and some in portrait (which can be done in MS Word by using the function "apply from this point onwards" rather than the whole document?
0
I need help with designing a school newsletter in the form of a MS Word template.  

Are there any takers here to help me with this task?  I need columns and images etc to be put in.
0
User is running office 365 and she has excel and word documents that always will crash every seven minutes and then it will show up as a file to be autorecovered.  I have had her move the file off the server and have it stored on the local hard drive with the same issue.  I tried upgrading her system to windows 10 with no luck and did both an online repair as well as full removal and reinstall of office.  Any thoughts?
0
Collaborating on Word Document in MS Teams crashing.
We have 2 users who are trying to collaborate on a word document opened from Teams and it keeps crashing on them.

3/12/19 This seems to be when you are editing in either word or excel instead of editing online. We have a shared excel spreadsheet shared on onedrive and it is continually exhibiting this at random times.
0
I have a 2016 MS Access - Word application.  The database has the front-end code stored in an Access db on each user's c-drive, and that front-end db links to the actual data which is stored on a fileserver.  This application supports MS Word 2016 mail merges.  These mail merges all have one datasource which is driven by a single temp table that is created on the user's local db copy.  If that single user wants to open more than one merge letter, they receive a run-time 3009 stating that 'you tried to lock table 'blah blah' while opening it, but the table cannot be locked because it is currently in use.  Wait a moment, and then try the operation again."

From what I can tell, the first merge letter is using an exclusive lock on the MS access temp table datasource.  Is it possible that the merge letter cannot use an exclusive lock allowing the single user to open multiple merge letters that are all based on the same temp table?

Thank you in advance!  -Jason
0
When pasting from Word into Excel, she gets an error, "Excel cannot paste the data" message.

Microsoft Office 2010 running on Windows 7

Attempted an office repair which was unsuccessful.
0
OWASP: Forgery and Phishing
LVL 13
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

The Far left drop down seems to be locked already as "no issues during shift". Is there a way to fix this so we can choose from the drop down? Also, For the date, can we add a calendar drop down?
Residents-Name.docx
0
Hi expert

Ms word question, in the event i have inserted a new object for excel file in the ms words.

question do i need to send the attachment when sending over the ms words to the next recipients.

if the answer  is no, how can i achieve this without send over the attachment.

For your reference, i have attached the screenshot for your reference.

thanks
Capture-for-MS-words-1.PNG
Capture-for-Ms-Words-2.PNG
0
How to read and write to  an MS word document having text , images etc .. in C# programmatically ? Kindly help .
1
The toolbar / navigation on my Word program is messed up.  See picture.  I've restarted the program a couple times but the display is still bad.  I can minimize and close the program where one would normally assume the buttons would be located, but I would like to have the display back to its normal self!

Screenshot_1.png
0
Can't Get this Macro to work.  Worked just ONCE.  Then, stopped.  What do you think is happening?

From this question: https://www.experts-exchange.com/questions/29076881/Word-Macro-for-Shift-F3-Like-Auto-Capitalization-That-Skips-the-Words-And-But-Or-For-and-To.html

Option Explicit

Sub SetTitlecase()
    Dim strLowerWords() As String
    Dim strProperWords() As String
    Dim rng As Range
    Dim rngWord As Range
    Dim i As Integer
    
    'set up except words
    strLowerWords() = Split("and,for,to,a,of", ",")
    
    ReDim strProperWords(UBound(strLowerWords))
    For i = 0 To UBound(strLowerWords)
        strProperWords(i) = UCase(Left(strLowerWords(i), 1)) & LCase(Mid(strLowerWords(i), 2))
    Next i
    
    'set range to work on
    Set rng = Selection.Range
    
    With rng
        'capitalise first letter of every word
        .Case = wdTitleWord
        
        'set first letter of minor words to lower case
        For i = 0 To UBound(strLowerWords)
            With rng.Find
                .Text = strProperWords(i)
                .Replacement.Text = strLowerWords(i)
                .MatchWholeWord = True
                .MatchCase = True
                .Execute Replace:=wdReplaceAll
            End With
        Next i
    End With
    
    'recapitalise first letter of sentences
    rng.Case = wdTitleSentence
End Sub

Open in new window

1
In Word 2016, you can reply to a comment in a document.  When you do, the reply is indented.

If I save the document and reopen it, that same reply is no longer indented.  Why?  Is there a way to control the Comment Balloon indentations?

Here is what it looks like when I reply to a comment

Comment Balloons showing as Indented
Here is what the same comment looks like after I save, close, and reopen the document:

Indentation removed
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.