Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x

Microsoft Word

27K

Solutions

20K

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

I would first describe what I am trying to do to explain my question.
I have custom class in my Project called Book with two properties - a Title and an Author (both strings).

I have a Command Button (named simpleButton)on a Form in my VBA application. I would like to assign an instance of this Book class (myBook) to the simpleButton (in some way). In my code I am assigning the tag property of simpleButton the value of myBook
I would now like the caption of this simpleButton to be equal to the Title of myBook (which in a previous line has been assigned to the tag property of simepleButton.
(I can do this kind of thing using C sharp in a .NET application Windows application and I trying to do the same in VBA). The code I have put in the code window may not make complete sense, but will hopefull explain my intention.
Private Sub cmdSimple_Click()

Dim myBook As book
myBook .Title = "Emma"
myBook .Author = "Jane Auston"
Me.cmdSimple.Tag = myBook 
 Object obj = Me.cmdSimple.Tag

 ' I basically want to cast obj to Book in the line that follows
  myBook = obj as book
  
Me.cmdSimple.Caption = myBook .Title

End Sub

Open in new window

0
Tech or Treat!
LVL 10
Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Hi,

Please see the attached redacted doc and the screenshot below. I created this Word doc using text boxes and arrows (the latter via Insert --> Shapes)
Text boxes hierarchy
I'd like to insert some text (e.g. PatientID) to the right of the green arrows pointing from Vitals to Patient and Insurance to Patient. However, I can't find a way to place the cursor at that spot. Since this region is merely a conglomeration of components - text boxes and arrows - rather than a single image - I'm baffled as to why I can't "go there".

I've attached the document in case anyone wants to play with it. :)

Thanks,
Steve
Redacted-Hierarchy-Document.docx
0
Am I understanding the "find" command correctly?
1. This is looking for DOG in all upper case.
2. The asterisk means wild card so DOGGIE will be found. And so will DOGS.
3. I don't know what the back slash is used for.
4. Is the parentheses part of what is being searched for?

 With Selection.Find
        .Text = "\(DOG*\)"
0
I'd like to have a macro where I
1. Search for the word "cat" or "CAT" or "cAt" or any combination of upper/lower case.
2. I want the macro to stop when it finds that character string and allow me to see what it found.
3. I want the macro to generate a YES NO CANCEL message box
     3a. YES will
            i.    extend the selection to the next hard return (enter key) symbol
            ii.    backspace one character from the hard return character, and
            iii.   exit the macro.
     3b   NO will deselect what it found, move forward one character and go to step 1 above.
     3c  CANCEL will exit the macro.
0
In my MS Access 2016 database, one of the fields is LONG-TEXT type.  I use this field for several paragraphs written information, some of which need BOLD or ITALICS.

How do I Export this information into Microsoft Word, and still Retain the BOLD / ITALICS formatting ?
0
I had this question after viewing MS Access Using VBA Split Word Docx file into separate Doc for Each Page.

Everything is working as "advertised" but the code is inserting an additional (blank) page for each of the pages in the original document except for the last page in the merge document. I have tried to figure this out for over a day but I am bumping up against my limited knowledge. Could someone please help?
0
I had this question after viewing Word macro to send selected text a predfined email address whilst preserving the formating in the selection.
The code provided as solution to this question works fine.
Sub EmailSelectedText()
'
' EmailNew Macro
'
'


Dim doc As Document
Dim SelText As String, eSubject As String
Dim olApp As Object
Dim sUserName As String
 
'     sUserName = Get_User_Name()
Set doc = ActiveDocument
SelText = Selection.text

If Len(SelText) = 1 Then
    MsgBox "Please select a Text to be emailed.", vbExclamation
    Exit Sub
End If
eSubject = Selection.Words(1) & " " & Selection.Words(2)

Set olApp = CreateObject("Outlook.Application")
With olApp.CreateItem(0)
    .To = "email.address@gmail.com"
    .Subject = eSubject
    .Body = SelText
   ' .display    'Remove this line and uncomment the next line to send the email
    .Send   'Uncomment this line to send the email
End With

Set olApp = Nothing
MsgBox "Handover Emailed for: " & eSubjct
' MsgBox "Handover Emailed for: " & eSubjct

End Sub

Open in new window

I would like this code to work for some of my colleageus who are on the same company Intranet as me. When I have created this macro for my colleageues and put this code on their machine, (for some but not other colleagues), the code does not work and I get an error message box (as shown in the embeded image).
VBA Error Message ScreeshotThe error message does not give any details. It just shows and icon and a help button and when I click the Help Button it takes you to a non-specific Micrsoft Page on VBA. Please note that the code works for me fine, if I log into my Windows Account on the same machine (the machine on which it gives error to a colleague when they are logged in through their own window account).
I would appreciate advice what could be blocking this code from working for other people. Thank you for your help. I think the error is not related to Macro Security, because other macros work fine on my colleague's machine.
0
With much help from EE I have a parameter driven working mail merge procedure in my Access 2013 application

Depending on the parameters passed it will create and store a word doc and/or a PDF for each record in the input file.

As it is now, the word documents are created and appear briefly on the screen before the next doc is created.

I would like to add an option that to print each document that is created.  The option would be passed to the routine as a boolean parameter.  However, I'm  don't know where or how to modify the mail merge code to print each created document.

Can this be done?

Here is the current routine:
Public Sub CreateMailMerge_wPDF(passedDocumentType As Long, _
                                passedMergeDocNameAndLocation As String, _
                                passedDatabaseOrTextInput As String, _
                                passedInputTableOrQueryOrTEXT As String, _
                                passedOutputWordDocLocation As String, _
                                passedOutputPDFLocation As String, _
                                passedGenerateWordDoc As Boolean, _
                                passedGeneratePDF As Boolean, _
                                passedWriteToLog As Boolean)

Dim wkDocType As String
'
'
Dim NumPages As Long
Dim wkCreatedName As String
'Dim wkSpecificReportID As String
Dim wkWordDocumentName As String
Dim wkOutputWordNameandLocation As String
Dim wkPDFName As String
Dim 

Open in new window

0
Dear Experts:

I would like to change line 3 of this code snippet to take the following circumstance into account:

The user-defined building block entry has now been saved to 'Building Block.dotx' instead of the Normal Template.

How would I have to change line 3 to accomodate for this new requirement?


Set rng = ActiveDocument.Paragraphs(2).Range
rng.Font.Size = 18
    NormalTemplate.BuildingBlockEntries("My_TOC_Just_Set_Names").Insert Where:= _
        Selection.Range, RichText:=True

Open in new window


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

Regards, Andreas
0
Have installed and reinstalled MS Word 2016 multiple times.  Get the attached error each time launching Word.  Any suggestions are appreciated.

Thank you
TZW.jpg
0
Important Lessons on Recovering from Petya
LVL 10
Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Hi

  I am using acrobat pro 11 to convert a word doc to pdf using vba in word 2013. I need to know how to change the security setting within vba to restrict editing of the pdf doc.
 Thanks.

 Here's my code :

Sub Créer_PDF()
'
' Créer_PDF Macro
'

Dim CurrentFolder As String
Dim FileName As String
Dim myPath As String
Dim UniqueName As Boolean

UniqueName = False

'Store Information About Word File

  myPath = ActiveDocument.FullName
  CurrentFolder = ActiveDocument.Path & "\"
  FileName = Mid(myPath, InStrRev(myPath, "\") + 1, InStrRev(myPath, ".") - InStrRev(myPath, "\") - 1)

  ActiveDocument.ExportAsFixedFormat _
        OutputFileName:=CurrentFolder & FileName & ".pdf", _
        ExportFormat:=wdExportFormatPDF, _
        OpenAfterExport:=False, _
        OptimizeFor:=wdExportOptimizeForPrint, _
        Range:=wdExportAllDocument, _
        From:=1, _
        To:=1, _
        Item:=wdExportDocumentContent, _
        IncludeDocProps:=False, _
        KeepIRM:=False, _
        CreateBookmarks:=wdExportCreateHeadingBookmarks, _
        DocStructureTags:=True, _
        BitmapMissingFonts:=True, _
        UseISO19005_1:=False
End Sub

Open in new window

0
Hi all, I wonder if someone could help me please.
I have a class of students with some learning problems and i want them to be able to easily save the documents they are working on by having a save button say on the bottom of each page not just in the toolbar.
Is this possible if so do any of you know the easiest way to set this up please.
Not sure if it would be some kind of a macro or something but that would be fine.
Any suggestions greatly appreciated.
Many thanks
Jon
0
I have the attached MS Word template, that was created with a custom SharePoint content type. Is it possible to manually change the property names of "Dev Number," "Dev Type," etc.? I know I can add custom properties view the Advanced Properties dialog, but those don't behave the same as the ones created via SharePoint (i.e. they do not appear in the Insert -> Quick Parts -> Document Properties dropdown, cannot be null, etc).

Any good documentation n this out there?

Document Properties
0
If the Zoom menu is showing only Thumbnails, check the Page Movement option. Chances are that it is set to Side to Side vs. Vertical page movement. Reset it to Vertical, and your normal Zoom functions should be restored.
0
I'm having trouble making hyperlinks work when we move the file folders to our archives. We're using Microsoft Office 2016.

I'm an auditor and as an organization we have moved to a paperless system where we produce reports which need to be sourced internally to other documents. The way we do that is to have a report with comments for each section or sentence that needs supporting documentation. It looks something like this:
 How we use hyperlinks to reference supporting documentation
Our problem is that when we are finished with an audit, we need to move the report and all the supporting documentation to various archives. That means that if the hyperlinks are absolute, (e.g. c:/users/michael/documents/filename.docx), the links will no longer work when we access the report from a different server or CD. Also, our audit files often have multiple folders within folders all within an overall audit folder, so I don't think a specific hyperlink base wouldn't work.

I've noticed that when I do hyperlinks while working remotely (VPNing into our servers from an audit site), the links sometimes automatically give a perfect relative link that will work regardless of where I move the audit folder (e.g. ..\..\SupportingDocs\Area4\Lorem Ipsum Doc B.pdf).

Is there any way to make MS Office default to creating those functional relative links? I know how to manually enter them in, but I can't train my colleagues to do that (I've tried).
0
Please advise.
0
How to add a CheckBox in the office 2016 - Word?  When the user click on the box, the box should get checked. How do i add the check box in the word?
0
Hello,

What styles are best to use when creating a Word document, particularly if you intend to include a Table of Contents (TOC)?

Following is a bit of an extreme example but suppose you have a document with the several parts as shown here:

2017-10-15a_EE.png
In this case, what styles would best be applied to:
• Title of the Manual
• Section number/letter
• Section title
• Chapter number
• Chapter Title
• Heading
• Sub-Heading

A big part of my question relates to being able to easily create a Table of Contents. So how would you select styles or which styles would you use in this case?

Also, how do you know which styles in the list will/can be recognized by the TOC?

Thanks
0
I need help with a word Macro that would copy Row 2 and Row 4 of first table in Active Document to the bottom of Word Document. So after I run this macro at the end of the Word document I will have a kind of abridged version of the original table.
The diagram embed in this question would clariy further what would be result of running the macro.
Thank you for your help. Diagram to illustrate end goal
0
Ask an Anonymous Question!
LVL 10
Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Confront means:

Meet (someone) face to face with hostile or argumentative intent.

for more see:
https://www.google.com/search?q=confront+definition&oq=confront+&aqs=chrome.2.69i57j0l5.22019j0j8&sourceid=chrome&ie=UTF-8

Question: Can you help me to find a word to mean:

Meet (someone) face to face with with loving intent?
or
Meet (someone) face to face to discuss a matter in a loving manner.
0
I'm trying to use Mail merge to create a 3-level numbered list from data in an Access table. The numbered list works at levels 1 & 2, but loses its indent at the 1st occurrence of a level 3 record. See screenshots of the Access data source, the merged fields in the Word doc (.docx), and the incorrect output after merging into a new document.
Aource data (Access table) Merge fields in Word doc  Word doc after merging
I tried the 3-level merging with .docx & .doc, and the .doc document worked temporarily. I also tried the merge with MDB and accdb source files. It worked for awhile with the mdb/doc combination, but reverted to the Level 3 error after 1 or 2 tries.

See my setup panel in the below screenshot.Milt-tiered numbered list setup panel
0
Starting Word 2016 for Mac Mail Merge with Gmail already running (on another monitor), Mailings/Finish & Merge “Merge to Email” is greyed out. As all the Mail Merge recipients are in the Gmail file, I need to use Gmail as the source file for Excel.  

Outlook not available with Office Home & Student 2016 for Mac.

’Preview Results’ works OK - The Mail Merge function was created before Gmail was running.

This statement precedes opening of Word/Mail Merge

“This file needs to be opened by the Excel 5.x Workbook text converter, which may pose a security risk if the file you are opening is a malicious file.  Choose OK to open this file only if you are sure it is from a trusted source.

How do I associate the Gmail file with Word so that the merge will work?
0
Dear experts,

Can anyone please guide me to the correct universal symbol in word. I read somewhere that 'si' is also used to denote an Universal set.

Kindly help.
0
e.g.:

 brandon
   smich
marl
      siracusa
   sabine

Open in new window


output
brandon
smich
marl
siracusa
sabine

Open in new window


i use Word List Updater 2.7   for windows os
0
Dear experts,

I am planning to draw venn diagrams in MS word. How do i colour code the overlapping area separately rather than the original circle.

For instance inthe below video (taken from public domain)
https://www.youtube.com/watch?v=NRJQn1AMik8

The presenter swtiches colour/bars for a part of the diagram/shape rather than the entire shape.

I am happy to prepare my notes in MS Powerpoint if that will help my objective.

Kindly advice.

Thank you
0

Microsoft Word

27K

Solutions

20K

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.