Solved

MS Office 2010 Format

Posted on 2013-05-17
3
369 Views
Last Modified: 2013-05-20
please see that we are using below code for generating stationary in our application.

Environment Details:-


Operating System = Windows 2008 R2 Enterprise Edition.
PowerBuilder Virtual Machine = PBVM 12.5 (means we are using PowerBuilder 12.5)
MS Office Template Used in application = Ms Office 2003.
We need to convert the template in = Ms Office 2010.


Code:-
li_result = ole_word.ConnectToObject("", "word.application")
IF li_result < 0 THEN
                li_result = ole_word.ConnectToNewObject("word.application")
END IF

IF li_result <> 0 THEN
                DESTROY ole_word
                ib_connected = FALSE
                MessageBox('MSWord Problem','Could Not Connect to MSWORD~n~nPlease make sure word runs properly on your machine~nRestart System')
                RETURN -1
END IF

ib_connected = TRUE
ole_word.Application.Visible = FALSE

RETURN 1

Our Application not allow to upload/attach the *.docx file. As mentioned in below screenshot.

Your kind help will be highly appreciated.
1.jpg
0
Comment
Question by:Netsol-NOS
3 Comments
 
LVL 21
ID: 39176241
The issue is not with the code you posted but the code that opens the file selection dialog box. The  File Type filter needs updated to included the new document types.

Example:

openFileDialog.InitialDirectory = @"c:\"; openFileDialog.Filter = "Word 2000-2003|*.doc|Word 2007/2010|*.docx|All|*.*"; openFileDialog.ShowDialog();

Open in new window

0
 
LVL 2

Accepted Solution

by:
imtiaza earned 500 total points
ID: 39183391
Try some steps in the attached document.
Also perform some optimization in the code.
Microsoft-Office-2010-Optimizati.docx
0
 

Author Closing Comment

by:Netsol-NOS
ID: 39183418
50% solution.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION The purpose of this document is to demonstrate the Installation and configuration of the Data Protection Manager product. Note that this demonstration was prepared on the basis of Windows OS is 2008 R2 and DPM 2010. DATA PROTECTI…
Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question