Quantcast
Channel: Word for Developers forum
Viewing all 4350 articles
Browse latest View live

Tabbing order in checkbox content controls in Word 2013 and 2010

$
0
0

I added a series of checkbox content controls to a Word2013 document, NOT a dialog box. When I click one of the checkboxes, the focus shifts to the SECOND checkbox in the series, NOT the NEXT checkbox.

I added some Visual Basic msgboxes to the OnEnter and OnExit events in the document to display the Title and Tag of the ContentControl that is being entered or exited. This shows that the focus DOES shift the the next checkbox in the series but it exits the checkbox immediately and enters the next box, which is the second box after the box clicked. In other words, it appears the focus is moving correctly from one box to the next, BUT the focus does not remain in the next box but quickly moves out of it.

I have tried the document in both Word 2013 and 2010, and the behavior is the same.

Is this a bug, or do I need to add code to prevent this?

Thanks,

Van


Ms Word 2010 Mail merge can't auto update

$
0
0

i got a problem with the mail merge in ms word 2010

Recently, i creating a word file for mail merge which the data source is also a word file. Both file are located on the network drive, Mail merge function work fine when the data source selected as "\ \ ServerName\...", but when i changed the path to IP Address "\ \192.168.xxx.xxx\..." (same server, just change the server name to IP address)the mail merge won't auto update the file.

Any one have idea on this?? is the mail merge function not support ip address or the SQL script not support ip address?

How to save the file affter appending the documnet using in vb.net

$
0
0

I have used below code  to append  TWO word Documents (which has custom xml nodes)

 Dim wordApp As New Word.Application
        Dim wordDoc As New Word.Document

        Dim doc As Word.Document = wordApp.Documents.Add()
        Dim rng As Word.Range = doc.Content
        rng.InsertFile(FileName:="D:\Templet\Bill of Lading.docx")
        Dim oEnd As Object = Word.WdCollapseDirection.wdCollapseEnd
        rng.Collapse(oEnd)
        rng.InsertBreak(Word.WdBreakType.wdPageBreak)
        rng.InsertFile(FileName:="D:\Templet\Bill of Lading - Supplement.docx")


       // doc.Save()

        wordApp.Quit()
        wordApp = Nothing

here i have to manually save the document. but i need to save the file in temp folder from there i have to read the xml nodes.

 Let me how can  i do that..

Problem in Microsoft office word ( Arabic edition )

$
0
0
 

 

 

Please, I have a note of all versions of Microsoft office (word).I shall describeitvery briefly

When we usedUnderline (trl+U) in Arabic language, the meanings of some words will be change. In general,thewordsthat existpoints at the bottom of it.I sufferedfromthis problema long time ago, if you allow me toexplain itto you, Let meexplain it to you in one(word). It applies tothe rest of nextwords

                                               بشريFor example the word  

Theexact meaning in Arabic language of this word(بشري)is (Human)

But when we click Underline (Ctrl+U) under the word (بشري)it will appears as (بشري)the exact meaning ofthe word(human) will be changetothe word(بشرى).And the newmeaningof this word becomes(Female Name).  Under line will stash the two points at the bottom of the word ( بشري)

This is a sample for others words, shown below:-

                                         (The word)                  (The meaning of it)                                   After (Ctrl+U)                     (The new meaning)

Female Name

بشري

Human

بشري

When

متي

Male Name

متي

When

يبقى

Keeps

يبقى

On

علي

Male Name

علي

Throw in bast

رمى

Throw now

رمى

               

Whentaking into considerationthe font size is 20,when the font becomes smallerwhenever theproblem becomes biggest..Please there are many samples in Arabic Language,except the above. And the same problem in English language for example the word (good) it becomes (good) this word was hitthe floordistortion.

To solve the problemwe must go to:

Insert            Shapes         Line, and thenwedraw alineunder theword (Is nota good idea,wastedtime and witherrors)

 

 

 

 


Missing docuemnt field after migrating to Office 2013

$
0
0

Dear all,

We was previously using office 2010 for generating our word documents. Now we have move to office2013.

ON one of our user PC's when we select a previous generated from from file explorer it is render as bellow :

On previewing the file, all the red circle section is not shown. Then if we open the document for edition, the document is complete BUT when we save it as PDF, then the Red circle section is completely missing from generated file.

This happen on a user PC while on the others it is ok withs ame installation .

Any idea how to correct this ?

regards

hover text

$
0
0
I have inserted a bookmark and hyperlink into my ms Word 2013 document.  My problem is when I click on ScreenTip to insert hover text, I am limited to inserting 256 text characters.  Is there anyway to remove the 256 character limit or expand it?  I need to add way more than just 256 characters to my hover text. Thanks.

Macro much slower when mouse cursor is in document

$
0
0

We have a word macro that executes 6 times slower when the cursor (I-beam) is in the Word document.  Has anyone experienced this?

how can i keep the the schema reference into word after appending the word doc using vb.net

$
0
0

hi,

I am using ms office 2013.
I have a situation where i need to append the word document to other document that is fine. i did..But i am losing the schema reference.May be reason is  saving the doc into other doc.

Problem is   i am unable to read the custom xml nodes.

i have followed below code: For appending the doc....

Dim wordApp As New Word.Application
        Dim wordDoc As New Word.Document

        Dim doc As Word.Document = wordApp.Documents.Add()
        Dim rng As Word.Range = doc.Content
        rng.InsertFile(FileName:="D:\Templet\Bill of Lading.docx")
        Dim oEnd As Object = Word.WdCollapseDirection.wdCollapseEnd
        rng.Collapse(oEnd)
        rng.InsertBreak(Word.WdBreakType.wdPageBreak)
        rng.InsertFile(FileName:="D:\Templet\Bill of Lading - Supplement.docx")


       doc.Save("D:\Templet\Test.docx")

        wordApp.Quit()
        wordApp = Nothing

How can i keep the schema reference (or) else is there a way to add the schema reference through the VB.Net Programing.


Using VBA macro, how to click or select a particular page in a word document or cursor focus need to put on desired page

$
0
0

Hi,

To select a specific page in a word document using VBA script, what is the code snippet. I tried with the below line to get count of pages. To add or edit on particular page ex: 5th page, i did not get any method to select. Thanks in advance for your help.

ActiveDocument.BuiltInDocumentProperties(14)

Thanks,

Ashok

VBA

$
0
0

Hi,

I want to select a specific page in a word document and then store the content of that page in a string variable using vba.Please help me!!

Thanks

John P

Word VBA

$
0
0

I have created a checklist in Word using Option Buttons. The checklist has 2 sections - the 1st to be completed by the user and the 2nd to be completed by the authorizer. When the 'user' completes and saves the document (macro-enabled), I need word to protect that section and also lock the Option Buttons. The same needs to happen when the authorizer saves the document (macro-enabled).

I have tried the Protect Document function but it does not lock the Option Buttons. Please help.

Macros

$
0
0

Between 2 offices, we are running Office 2007 and 2010.  In Outlook, we send 2 distinct emails to new clients over and over and instead of cutting and pasting over and over, I wanted to make a Macro where we could click on an icon on the ribbon and voila, the specific email template with attachments and text is there.  I have tried making a Macro, but the issue is that I need one Maco for each email.  This is the code I used:

Sub DoIt()
Set msg = Application.CreateItemFromTemplate("C:\Users\nick\AppData\Roaming\Microsoft\Templates\Adult Welcome to our Office.oft")
msg.Display
End Sub

I have started tinkering with Outlook 2010 to make this Macro and have not even ventured into 2007 yet.  Not sure if it will be similar in that version or not.  I am able to make the first email Macro and even place an icon on the ribbon with ease, but have no clue on how to make a second Macro that corresponds to the second email, and place that on the ribbon.  Anyone able to help me out?

how can i update charts' data in word document by using OpenXML

$
0
0

There was 18 charts In my word document . I can get the charts by code like this:

private MainDocumentPart mainDocPart;

......

ChartPart c_p = mainDocPart.ChartParts.FirstOrDefault();

Then I can update the data of charts.But the problem is this:

I have 18 charts In the document , and the charts index was random.So I can't get the chart by index yet:

ChartPart c_p = mainDocPart.ChartParts.ElementAt(index);//index is Integer Value

So can I appoint the ID or Name for each of the 18 charts?And Can I get Them By ID or Name?

I can update one Charts data by Openxml.If neither,How can I update datas for so many charts by OpenXml?


赵召


how can i add the schecama refernce through vb.net

$
0
0

Hi all

I have a situation where i need to add schema reference(Custom XML Node file )  to word document( Ms office 2013).

Let me know how can i do this through the Vb.Net.

Thanks,

Kavitha

Repeat Table Header Row not working in 2013 with large images

$
0
0

Hi,

I see 'Repeat Table Header Row' behavior different in Word 2013 as against Word 2010.

1.Insert a new word table say 10x10. Now select 1st row-> Table Properties
2.Check  'Repeat as Header Row at the top of each page'. 
3.Now with header row set to repeat on each page, insert a big image A(select one from Library-> Sample Pictures).
4.Insert another big image B(from same folder) in row 9th. Observe the table on page 2.

Word 2013:The header row is missing. Now if you keep scaling down the image B, at somepoint both header row image A and image B would be visible on page 2.

Word 2010: Header row is repeated as expected and both image A and B are visible on page 2

This happens only for big images, when 2 images cannot fit on same page.

Is this a bug or behavior change in Word 2013?


VBA Automation

$
0
0

I want to compare two word documents using vba.I have written some piece of code.It is comparing two document successfully and notifying the user whether the pages are matching or not.But I want that it will compare two pages and also return that in which line of the page a discrepancy is.I am sharing my code please let me know how I can implement this.(In the below mentioned code I am comparing Page #2 of word document)

            

 Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Open(TextBox1.Text)
objWord.Selection.GoTo What:=1, Which:=1, Name:="2"
    strtemp = objDoc.Bookmarks("\page").Range.Text
    objWord.Quit

Dim objword1 As Object
Set objword1 = CreateObject("Word.Application")
Set objDoc1 = objword1.Documents.Open(TextBox3.Text)
objword1.Selection.GoTo What:=1, Which:=1, Name:="2"
    strtemp1 = objDoc1.Bookmarks("\page").Range.Text
   objword1.Quit


    If str = str1 Then
MsgBox "Matched", vbInformation
Else
MsgBox "Not Matched", vbInformation
End If

Thanks

John P


Open PDF Files using vba automation

$
0
0

I want to copy the entire content of a pdf document into a word document using vba.I have written some lines of code.It is working but it can't copy the table format present in a pdf file,it is only coping the value present in the table.Below mentioned code has been written by me.Please help me to find out the solutions.

Dim abc As Long

abc = Shell("C:\Program Files\Adobe\Reader 11.0\Reader\AcroRd32.exe " & "C:\Users\John\Desktop\3120850379.pdf", vbNormalFocus)

 SendKeys "^a"

 SendKeys "^c"

SendKeys "%{F4}"

Set obj = CreateObject("Word.Application")
        obj.Visible = True
        Set book = obj.Documents.Add

        

obj.Activate

        SendKeys ("^v")

excelobj.ActiveDocument.SaveAs "C:\Users\John\Desktop\Test.doc"
        
        
        book.Close
        obj.Quit

how can i loop the Repeating Section Content Controls using vb.net

$
0
0

I have a Repeating Section Content control.

Like in the image : In first line i have placed Repeater control.Currently it has 4 xml nodes inside.

i need to Print the data based on xml nodes and as well as below (10)lines by inserting new repeater control for each time.

i have followed below code : But this is not correct. 

For Each XMLNode1 In wordApp.ActiveDocument.ContentControls
            If XMLNode1.Type = Microsoft.Office.Interop.Word.WdContentControlType.wdContentControlRepeatingSection Then
                XMLNode1.Range.Text = "Note"
     End If
        Next

Can i have sample in vb.net for Repeating  the Repeating Section Content control and inserting new Repeating Section Content control.




range.moveend is not working

$
0
0

When I call it the Range.End does not change. It appears that End is readonly.  I have also tried bookmark.End ++.

So I tried duplicating the range and calling MoveEnd()  That works on the duplicate, but then the bookmark.Range is readonly, so I cannot replace the range with the modified one.

Ms Office Word Add-in : Insert Images in Shape single tiled and set TextureVerticalScale and TextureoffsetX properties ?

$
0
0

 Have a Good Day !

i want to insert image without tiles in shape and also set image  TextureVerticalScale and TextureoffsetX properties..

i have create word add-in to insert image in office word document shape. i successfully inserted image in document using this method(first method) UserTextured('image Path'). but it show tils of image instead of single tile , and if i use (Second method)UserPicture('Image Path') method it display stretch image that should be actual. and when i set the offsetX and textureHorizentalScale it again show tiles and mirror of image.

http://social.msdn.microsoft.com/Forums/getfile/453110


Viewing all 4350 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>