Unable to get Last record using MailMerge.DataSource.LastRecord or MailMerge.DataSource.RecordCount the first variable always returns -16 and the second one returns -1.
C# - MS Word - MailMerge how to get Last Record when MailMerge.DataSource.LastRecord returns -16
662 Views Asked by M.J At
1
There are 1 best solutions below
Related Questions in C#
- How to call a C language function from x86 assembly code?
- What does: "char *argv[]" mean?
- User input sanitization program, which takes a specific amount of arguments and passes the execution to a bash script
- How to crop a BMP image in half using C
- How can I get the difference in minutes between two dates and hours?
- Why will this code compile although it defines two variables with the same name?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Why can't I use the file pointer after the first read attempt fails?
- #include Header files in C with definition too
- OpenCV2 on CLion
- What is causing the store latency in this program?
- How to refer to the filepath of test data in test sourcecode?
- 9 Digit Addresses in Hexadecimal System in MacOS
- My server TCP doesn't receive messages from the client in C
- Printing the characters obtained from the array s using printf?
Related Questions in MS-WORD
- VBA query - sort text in alphabetical order in Word
- Can you programmatically generate a link to open a Word document and navigate to a particular location within it (preferably a comment)?
- How can I create an automatic table of contents in docx without the text being bold?
- Does MS Word secretly upload my file to cloud?
- How to use VBA to bold just some text
- Find text and numbers Formatted: "Case: BE########" and format them, regardless of the number
- Access all documents for Word from multiple instance using Excel VBA
- Using document.Application.PixelsToPoints will give different results
- Error: "Document_KeyUp" event not working
- Word macro for reversing selected text
- Make a table of remarks/figures, and format it as a table
- Add custom ribbon button to dotm file that runs macro
- Inline pictures: Add margin
- Excel VBA: Action logging on label click (like Audit Trail)
- Custom referencing format in CSL document, Want to add whitespace into bibliography
Related Questions in MAILMERGE
- Mailmerge Word used by different users
- Percentages in a mail merge
- Is there a way to execute a mail merge using excel as data source to word but with multiple recipients and changing email subject using macro?
- Python to mailmerge csv to word in continuous in one document
- Why does the space bar duplicate the previous field in creating mail merge labels instead of making a space?
- Word Mail Merge with ASPOSE repeats header in table for all data rows
- Replace all section breaks (^b) in a mail merged document with page break (^m) doesn't work
- VBA for mail merge with dynamic loop with where condition
- Word mail merge document - set number of pages in header
- ModuleNotFoundError: No module named 'mailmerge'
- Word many-to-one merge for an invoice using from a .CSV file using NEXTIF or VBA and not a plugin
- How to get Excel VBA code to trigger Word Mail Merge
- Generate different PDFs with mailmerge depending on cell value - Google Sheets
- Convert beautiful HTML/CSS template to PDF report
- Mail merge, one email per person, multiple values
Related Questions in RECORD-COUNT
- How do I send a record count of a flat file in an email in SSIS
- How to display the count of records in a file?
- c# datatable row count returns 1 for empty table
- Access VBA Subform Dynamic SQL Parent Form Count Slow
- how to read record count while unloading from redshift to s3 in airflow
- Postgresql function returning number of records
- ColdFusion RecordCount as multiple conditional
- VBA If/Then based on Record Count
- ExecNonQuery SQL
- Access VBA Filter RecordCount not properly updating value
- VBA - ADODB.Connection - Using parameters and retrieving records affected count
- RecordCount Property not working
- How to get FireDAC record count when SetRange active
- Is it possible to use RecordCount with Criteria
- Recordcount returns value of -1
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Cause:
.LastRacordand.RecordCountwas returning -16 and -1 because I was reading data from the CSV file.Solution: The following code will return the last record or record count reading dataset from CSV file or text file.
Note
The above code is for word application level AddIn