?
Solved

MS Office 2010 Format

Posted on 2013-05-17
3
Medium Priority
?
372 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 1000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

We were having a lot of "Heartbeat Alerts" in our SCOM environment, now "Heartbeat" in a SCOM environment for those of you who might not be familiar with SCOM is a packet of data sent from the agent to the management server on a regular basis, basic…
When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

770 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